boost learn study
Showing posts with label
Jumping Statements
.
Show all posts
Showing posts with label
Jumping Statements
.
Show all posts
Friday, March 28, 2014
Continue statement
/*The following program using continue statement*/ #include< stdio.h >#include< conio.h >void main() { int i=1; clrscr(); while(i<=10) { if(i==6) { continue; } printf("\n I=%d",i); i++; } getch(); }
Output is as :
I=1
I=2
I=3
I=4
I=5
I=7
I=8
I=9
I=10
Read more �
break statement
/*The following program using break statement*/ #include< stdio.h >#include< conio.h >void main() { int i=1; clrscr(); while(i<=10) { if(i==6) { break; } printf("\n I=%d",i); i++; } getch(); }
Output is as :
I=1
I=2
I=3
I=4
I=5
Read more �
goto statement
/*The following program using goto statement*/ #include< stdio.h >#include< conio.h >void main() { int l; clrscr(); Laura: //here Laura is the name of goto Label printf("Enter any No."); scanf("%d",&l); if(l==5) { goto Laura; } printf("\n%d",l); getch(); }
Read more �
Older Posts
Home
Subscribe to:
Posts (Atom)