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
write an algorithm to display a square matrix.
How can I remove the trailing spaces from a string?
What are lookup tables in c?
What kind of structure is a house?
What is the usage of the pointer in c?
What are the general description for loop statement and available loop types in c?
What is a const pointer?
What is #error and use of it?
What is the significance of scope resolution operator?
Is stack a keyword in c?
What is line in c preprocessor?
Is malloc memset faster than calloc?
Where are c variables stored in memory?
Why does this code crash?
find out largest elemant of diagonalmatrix