A program for do-while loop
syntax :-
{
initialization;
do
statements;
incrementation/decrementation;
while(condition);
}
Example :-
#include<stdio.h>
main()
{
int i=10;
do
{
printf("%d\n",i);
i=i+1;
(or)
i++;
}return 0;
getch();
}
10
11
12
13
14
15
0 comments:
Post a Comment