SlidePub
Home
Categories
Login
Register
Home
Technology
Break and continue statement in C
Break and continue statement in C
cmarathi
2,317 views
14 slides
Feb 25, 2014
Slide
1
of 14
Previous
Next
1
2
3
4
5
6
7
8
9
10
11
12
13
14
About This Presentation
Explanation of break and continue statements in C language.
Size:
282.88 KB
Language:
en
Added:
Feb 25, 2014
Slides:
14 pages
Slide Content
Slide 1
Break and Continue statement
Slide 2
Break Statement
Slide 3
June
Result
December
Result
Normal Study Period
Re-valuation
Result
Study Period if subject
is cleared in the
revaluation process
Slide 4
#include<stdio.h>
#include<conio.h>
main()
{
……………………………….
……………………………….
……………………………….
while(condition)
{
…………….
…………….
if(condition)
break;
…………….
…………….
…………….
increment or decrement;
}
………………………………….
………………………………….
………………………………….
getch();
}
If condition becomes true
Slide 5
Prime Number
. , , , ,
, , :
….!
, , , , , ,
….!
Slide 6
#include<stdio.h>
#include<conio.h>
void main()
{
int num, i;
clrscr();
printf(“Enter Number\t”);
scanf(“%d”, &num);
i = 2;
while(i < num –1)
{
if(num % i == 0)
{
printf(“Numbers is not prime\n”);
break;
}
i++;
}
if(i == num)
printf(“Number is prime\n”);
getch();
}
Slide 7
Enter Number 5
Number is prime
_
Slide 8
Enter Number 37
Number is prime
_
Slide 9
Enter Number 25
Number is Not prime
Number is prime
_
Slide 10
Enter Number 25
Number is Not prime
_
Slide 11
#include<stdio.h>
#include<conio.h>
void main()
{
int num, i;
clrscr();
printf(“Enter Number\t”);
scanf(“%d”, &num);
i = 2;
while(i < num –1)
{
if(num % i == 0)
{
printf(“Numbers is not prime\n”);
break;
}
i++;
}
if(i == num)
printf(“Number is prime\n”);
getch();
}
25 2
num i
Slide 12
Continue statement
for(i = 1; i < 10; i++)
{
do this;
do this;
if(condition)
continue;
do this;
do this;
}
If condition is
true
If condition is
false
Slide 13
5
10
15
20
25
30
35
40
45
50
_
Slide 14
#include<stdio.h>
#include<conio.h>
void main()
{
int j;
clrscr();
for(j=1; j<=50; j++)
{
if(j % 5 != 0)
continue;
printf(“%d\n”, j);
}
getch();
}
When j is not divisible
by 5
Tags
c marathi
break keyword in c
how to use continue statement in c
c programming language
e-learning
how to use break in loop
c language
Categories
Technology
Education
Download
Download Slideshow
Get the original presentation file
Quick Actions
Embed
Share
Save
Print
Full
Report
Statistics
Views
2,317
Slides
14
Favorites
6
Age
4298 days
Related Slideshows
11
8-top-ai-courses-for-customer-support-representatives-in-2025.pptx
JeroenErne2
46 views
10
7-essential-ai-courses-for-call-center-supervisors-in-2025.pptx
JeroenErne2
45 views
13
25-essential-ai-courses-for-user-support-specialists-in-2025.pptx
JeroenErne2
36 views
11
8-essential-ai-courses-for-insurance-customer-service-representatives-in-2025.pptx
JeroenErne2
33 views
21
Know for Certain
DaveSinNM
20 views
17
PPT OPD LES 3ertt4t4tqqqe23e3e3rq2qq232.pptx
novasedanayoga46
24 views
View More in This Category
Embed Slideshow
Dimensions
Width (px)
Height (px)
Start Page
Which slide to start from (1-14)
Options
Auto-play slides
Show controls
Embed Code
Copy Code
Share Slideshow
Share on Social Media
Share on Facebook
Share on Twitter
Share on LinkedIn
Share via Email
Or copy link
Copy
Report Content
Reason for reporting
*
Select a reason...
Inappropriate content
Copyright violation
Spam or misleading
Offensive or hateful
Privacy violation
Other
Slide number
Leave blank if it applies to the entire slideshow
Additional details
*
Help us understand the problem better