how i m write c program 1.check prime number 2.prime number
series
Answer / sulthan
#include<stdio.h>
void main()
{
int a,i,n=0;
printf("\nEnter the Number");
scanf("%d",&a);
for(i=1;i<=a;i++)
if(a%i==0)
n++;
if(n=2)
printf("Prime")
else
printf("NOT Prime");
}
| Is This Answer Correct ? | 5 Yes | 2 No |
What is the purpose of type declarations?
What are the two types of functions in c?
difference between native and cross compilers
What is struct node in c?
What is %g in c?
What are static variables, and where are they stored?
Explain spaghetti programming?
What does the error message "DGROUP exceeds 64K" mean?
Is the below things valid & where it will be stored in memory layout ? static const volatile int i; register struct { } ; static register;
When should the const modifier be used?
What is the output of the following program #include<stdio.h> main() { int i=0; fork(); printf("%d",i++); fork(); printf("%d",i++); fork(); wait(); }
write a c program in such a way that if we enter the today date the output should be next day's date.