The Break Keyword (Program)
Program:
#include<stdio.h>
#include<conio.h>
void main()
{
int i=1;
clrscr();
while(1)
{
if(i>10)
{
break;
}
else
{
printf("%d\n",i);
i++;
}
}
getch();
}
Output:
1
2
3
4
5
6
7
8
9
10
Program:
#include<stdio.h>
#include<conio.h>
void main()
{
int i=1;
clrscr();
while(1)
{
if(i>10)
{
break;
}
else
{
printf("%d\n",i);
i++;
}
}
getch();
}
Output:
1
2
3
4
5
6
7
8
9
10
👌🏻👌🏻👍🏻
ReplyDelete