RicardasSim icon

while, do while

RicardasSim | PRO | 12/22/22 05:52:59 PM UTC | 0 ⭐ | 1265 👁️ | Never ⏰ | []
C |

290 B

|

None

|

0 👍

/

0 👎

#include <stdio.h>
#include <stdlib.h>
 
 
int main() {
 
    int a = 11;
 
    while ( a < 10 )
    {
        printf("loop1\n");
        a++;
    }
 
    do
    {
        printf("loop2\n");
        a++;
    }
    while ( a < 10 );
    
 
    return 0;
}
 
/*
output:
 
loop2
 
*/

Comments