English, asked by rishilaugh, 1 year ago

c program to find prime number between 1 and 100

Answers

Answered by Anonymous
1
c program (input from user)
#include
#include
int main()
{
int number,a,b,p;
printf("Enter any number: ");
scanf("%d", &number);
for(a=2; a<=number; a++)
{
for(b=2; b {
if(a%b==0)
{
p=0;
break;
}
p=1;
}
if(p)
printf("\t%b",a);
}
getch();

}
hope this helped pl mark as brainliest
Answered by Anonymous
0

Explanation:

hey \: pls \: like \: my \: answer

C Program to find (print) the Prime numbers between 1 and 100

This page has a C program to display the prime numbers between 1 and 100. The Prime number is a whole number and has no divisors other than 1 and the tested number. The Prime number can be divisable by 1 and the number itself. If a number has more positive divisors other than 1 and the number itself, then the number is not Prime number. For example: 2, 3, 5, 7, 11, 13, 17 . . . are Prime numbers. The below given C program to display (print) the prime numbers between 1 and 100. Kindly check out the program to display the prime numbers between 1 and 100.

.

Similar questions