Write a program to print prime nums from 1-20 using c
programing?
Answer Posted / aniruddha tripathi
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int n,m,i;
clrscr();
printf("\n ENTER THE NUMBER");
scanf("%d",&n);
i=2;
ab:mfmod(n,i);
if(m==0);
{
printf("\n it is not prime");
goto bc;
]
else
{
i=i+1;
if(i<=(n-1))
{
goto ab;
}
printf("\n it is a prime no.");
}
bc;
getch();
}
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is #define size in c?
What are the c keywords?
Write program to remove duplicate in an array?
The statement, int(*x[]) () what does in indicate?
What is the difference between ++a and a++?
write a program to print largest number of each row of a 2D array
What does typeof return in c?
Why does not c have an exponentiation operator?
Why c is called top down?
Write a program to know whether the input number is an armstrong number.
What is union in c?
What is far pointer in c?
Why c is a procedural language?
Is printf a keyword?
What is table lookup in c?