English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

The full question, with example.
Using a while loop, write a program that asks the user to enter a number that is larger than 10. The program will continue asking for a number until a number that is larger than 10 has been entered. The program will then print the valid number entered followed by the message "Done".

Sample input and output :
Enter a number larger than 10 : 5
Enter a number larger than 10 : 10
Enter a number larger than 10 : 15
You entered 15
Done
- I can start off but cannot get a number that is larger than 10. Please help. thanks

2007-02-21 09:06:24 · 2 answers · asked by Facilitate 1 in Computers & Internet Programming & Design

2 answers

#include

int main(void){
int number=0;

while(number<=10){
cout<<"Enter a number larger than 10 :";
cin>>number;
}
cout<<"You Entered "< return(0);
}

2007-02-21 09:29:05 · answer #1 · answered by Amanda H 6 · 0 0

Post question with your code so we can help debug it... Your teacher won't like it much if we write it for you.

2007-02-21 09:09:58 · answer #2 · answered by BigRez 6 · 0 0

fedest.com, questions and answers