• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Break and continue statement in C
 

Break and continue statement in C

on

  • 127 views

Explanation of break and continue statements in C language.

Explanation of break and continue statements in C language.

Statistics

Views

Total Views
127
Views on SlideShare
126
Embed Views
1

Actions

Likes
0
Downloads
4
Comments
0

1 Embed 1

http://www.slideee.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Break and continue statement in C Break and continue statement in C Presentation Transcript

    • Break and Continue statement
    • Break Statement
    • June Result Re-valuation Result December Result Normal Study Period Study Period if subject is cleared in the revaluation process
    • #include<stdio.h> #include<conio.h> main() { ………………………………. ………………………………. ………………………………. while(condition) { ……………. ……………. If condition becomes true if(condition) break; ……………. ……………. ……………. increment or decrement; } …………………………………. …………………………………. …………………………………. getch(); }
    • Prime Number . , , , , ….! , , , , , , , : , ….!
    • #include<stdio.h> #include<conio.h> void main() { int num, i; clrscr(); printf(“Enter Numbert”); scanf(“%d”, &num); i = 2; while(i < num – 1) { if(num % i == 0) { printf(“Numbers is not primen”); break; } i++; } if(i == num) printf(“Number is primen”); getch(); }
    • Enter Number Number is prime _ 5
    • Enter Number Number is prime _ 37
    • Enter Number Number is Not prime Number is prime _ 25
    • Enter Number Number is Not prime _ 25
    • #include<stdio.h> #include<conio.h> void main() { int num, i; clrscr(); printf(“Enter Numbert”); scanf(“%d”, &num); i = 2; while(i < num – 1) { if(num % i == 0) { printf(“Numbers is not primen”); break; } i++; } if(i == num) printf(“Number is primen”); getch(); } 25 num 2 i
    • Continue statement for(i = 1; i < 10; i++) { do this; If condition is do this; true if(condition) continue; do this; If condition is do this; false }
    • 5 10 15 20 25 30 35 40 45 50 _
    • #include<stdio.h> #include<conio.h> void main() { int j; clrscr(); for(j=1; j<=50; j++) { if(j % 5 != 0) continue; printf(“%dn”, j); } getch(); } When j is not divisible by 5