/* This is an example of nested loops */
main()
{
int count, i;
count = 0;
while (count < 3) {
i = 0;
do {
printf("The value of i is now %d\n",i);
i = i + 1;
} while (i < 2);
printf("The value of count is %d\n\n",count);
count = count + 1;
}
}NESTLOOP.C
|
| Κατεβάστε το πρόγραμμα στον υπολογιστή σας |