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 |
A B C D E F G F E D C B A A B C D E F F E D C B A A B C D E E D C B A A B C D D C B A A B C C B A A B B A A A
How do I send escape sequences to control a terminal or other device?
What will the code below print when it is executed? int x = 3, y = 4; if (x = 4) y = 5; else y = 2; printf ("x=%d, y=%d ",x,y);
What is the code for 3 questions and answer check in VisualBasic.Net?
What is a pointer in c plus plus?
What is meant by global static? why we have to use static variable instead of Global variable
any "C" function by default returns an a) int value b) float value c) char value d) a & b
What is the difference b/w Structure & Class?
What are the different types of linkage exist in c?
how we do lcm of two no using c simple if while or for statement
program to find the ASCII value of a number
while initialization of two dimensional arrays we can initialize like a[][2] but why not a[2][] is there any reason behind this?