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
how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12
When should a far pointer be used?
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.
In which header file is the null macro defined?
how logic is used
How reliable are floating-point comparisons?
what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?
What does 1f stand for?
What is the translation phases used in c language?
What is a c token and types of c tokens?
What does the function toupper() do?
What is c programming structure?
What is return in c programming?
What is a pointer and how it is initialized?
Explain how can you determine the size of an allocated portion of memory?