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 / pratibha

#include<stdio.h>
#include<conio.h>
void main()
{
int no,i,count=0;
clrscr();
printf("enter the no");
scanf("%d",&no);
for(i=1;i<=no;i++)
{
if(no%i==0)
{
count=count+1;
}
}
if(count<=2)
{
printf("this is prime no");
}
else
{
printf("this is not prime");
}
getch();
}

Is This Answer Correct ?    17 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is c# a good language?

1011


what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values

1695


What is meant by int main ()?

1204


How will you delete a node in DLL?

1286


What does %2f mean in c?

1215


What is #line in c?

1014


Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)

1283


When would you use a pointer to a function?

1047


about c language

2006


Write a program with dynamically allocation of variable.

1126


What are the applications of c language?

1078


What does 2n 4c mean?

1231


What is the 'named constructor idiom'?

1085


What is the difference between far and near in c?

1067


Where are c variables stored in memory?

1067