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...

write the program for prime numbers?

Answer Posted / biswa

void main()
{
int i=2;
int count=0;
int n;
printf("enter a no");
scanf("%d",&n);
for(i=2;i<n/2;i++)
{
if(n%i==0)
{
count++;
}
if(count>1)
{
prinf("prime");
else
printf("not prime");
}

Is This Answer Correct ?    311 Yes 310 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a program to create a sparse matrix using dynamic memory allocation.

4892


Write a program to identify if a given binary tree is balanced or not.

1159


What is scope of variable in c?

1040


praagnovation

2277


What is volatile, register definition in C

1105


What does it mean when the linker says that _end is undefined?

1093


What is %s and %d in c?

1037


How can I insert or delete a line (or record) in the middle of a file?

1015


What is the difference between array and pointer in c?

1159


code for replace tabs with equivalent number of blanks

2158


What is the right type to use for boolean values in c?

1030


Why enum is used in c?

950


Is it better to bitshift a value than to multiply by 2?

1092


What are structure members?

1090


Why static variable is used in c?

1035