Syntax:
while(condition) { statements; }
Example:
i=1; while(i<3) { printf("Condition Satisfied!\n"); i++; }
Output:
Condition Satisfied! Condition Satisfied!
_____________________
BloggingSimplified.in
_____________________
All in one blogging website
Syntax:
while(condition) { statements; }
Example:
i=1; while(i<3) { printf("Condition Satisfied!\n"); i++; }
Output:
Condition Satisfied! Condition Satisfied!
_____________________
BloggingSimplified.in
_____________________
Syntax:
for( Initialization ; Condition ; Increment or Decrement) { Statements; }
Example:
for(i=1;i<=5;i++) { printf("%d\n",i); }
Output:
1 2 3 4 5
_____________________
BloggingSimplified.in
_____________________