Programming In C
Improve your Programming Skills with almost every C Program.
Home
Blog Posts
Life Style
Relationship
Make Money
Follow Us
Facebook
Twitter
About Us
Who We Are?
Contact Us
Tuesday, September 8, 2009
Print prime numbers between 1-300 using break and continue in c
Print
prime numbers between 1-300 using break and continue in c
#include
#include
main(){
int i, j;
i = 2;
while ( i < 300 ){
j = 2;
while ( j < sqrt(i) ){
if ( i % j == 0 )
break;
else{
++j;
continue;
}
}
if ( j > sqrt(i) )
printf("%d\t", i);
++i;
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment