#include <stdio.h>
main()
{
int i, j;
i = 1;
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;
}
return 0;
}
Learn More :
Prime Number
- Check given number is prime number or not using c program.
- C Program to Check Prime Use Loop And Recursive
- C or C++ program to print prime number
- C or C++ Program To Print Prime Number
- C Program For Prime Number or Not
- C Program For Prime Number Using Function
- C Program For Prime Number
- Huge Prime in C Program
- C Program to Detection of a Prime Number
- C Program to print all prime numbers from 1 to 300.
- C Program To Find Prime Number And If Number Is Not Prime Then Find Factors
- C Program to Find Prime Number and Complex Number
- C Program to accept n numbers & store all prime numbers in an array & display this result
Continue Statement
print
- Write a c program to print Pascal triangle.
- C or C++ Program To Print Prime Number
- C Program print fill zero & mod/div
- C Program to printf & scanf Example
- C Program to Print a String Without Use Semicolon.
- C Program To Input & Print More Than One Words In Single Line
- C Program To Print Alphabets Like {Aa Bb Cc...}
- C Program To Print Alphabets Like {Az By Cx...}
- C Program To Print Lines Of A Paragraph Having More Than 15 Characters
- C Program To Print Prime Numbers Upto The Number You Want
- C Program To Print String In Formatted Output Form
- C Program To Print Sum Of n Digit Number
- C Program To Print Table Horizontally
- C Program To Print Tridiagonal Matrix
- C Program To Print Text Into Uppercase
- Printing ASCII Table with Numbers and corresponding characters
- C Program to print all prime numbers from 1 to 300.
- C program that lets the user choose if he wants to add a item to the shopping list or print it out
- C Program to print table vertically
- Loudness Program: Gets loudness level from user; chooses a response And prints it using logical and operative statements
- C program that receives 10 float numbers from the console and sort them in non-ascending order, and prints the result
- Function should print the cartesian coordinates of the struct argument
- C Program Read a char & print next char ( file to file )
- Primul meu program in C Program
Break Statement