Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how i m write c program 1.check prime number 2.prime number
series



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

Post New Answer

More C Interview Questions

What is the purpose of type declarations?

0 Answers  


What are the two types of functions in c?

0 Answers  


difference between native and cross compilers

0 Answers  


What is struct node in c?

0 Answers  


What is %g in c?

0 Answers  


What are static variables, and where are they stored?

2 Answers  


Explain spaghetti programming?

0 Answers  


What does the error message "DGROUP exceeds 64K" mean?

0 Answers   Celstream,


Is the below things valid & where it will be stored in memory layout ? static const volatile int i; register struct { } ; static register;

2 Answers   Bosch,


When should the const modifier be used?

0 Answers  


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(); }

8 Answers   ADITI, Adobe,


write a c program in such a way that if we enter the today date the output should be next day's date.

0 Answers  


Categories