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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an endless loop?

1269


Difference between Shallow copy and Deep copy?

2019


What is c definition?

1272


What is equivalent to ++i+++j?

1088


Why is void main used?

1094


What is output redirection?

1216


What are the data types present in c?

1162


Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)

2294


What is the explanation for the dangling pointer in c?

1113


What is a void pointer in c?

1105


The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?

1205


List the difference between a "copy constructor" and a "assignment operator"?

1011


Is c is a middle level language?

1061


For what purpose null pointer used?

1068


Explain main function in c?

1082