![]() |
| ||
| while loop Hi i have this program and have a problem it is a basic program for exponents and now i need to add a while loop so that if the user enters a number greater that 10 it asks them to input a number lower or equal to 10, here is my code can someone help me?. #include <stdio.h> |
| ||
| Re: while loop 1. Please edit your post to use code tags to preserve spacing and tabs. 2. main() must be declared like this: int main() I realize neither of the above answer your questions, but fix those and we will look at your post again. |
| ||
| Re: while loop x is not declared as a variable anywhere that I can see. this should give a complier error. Also, your while statement is terminated by a semicolon. This would work for do-while statement but not when the using a while by itself. If using a while in this way it should be followed by braces surrounding the code to be executed during each iteration of the loop. |
| ||||
| Re: while loop Quote:
Quote:
Quote:
Quote:
|
| All times are GMT -4. The time now is 2:33 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC