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

main()
{
for(int i=1;i<100;i++)
{
count=0;
for(j=1;j<=100;j++)
{
if(i%j==0)
{
count++;
}
}
if(count==2)
{
printf(i);
}
}
getch();
}

Is This Answer Correct ?    12 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the differences between Structures and Arrays?

1271


Can static variables be declared in a header file?

1098


What happens if a header file is included twice?

1076


What is merge sort in c?

1110


a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above

1283


write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.

2572


4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.

2240


Explain how can I read and write comma-delimited text?

1227


Describe the order of precedence with regards to operators in C.

1100


How many data structures are there in c?

1168


Describe wild pointers in c?

1166


What does stand for?

1141


Is null always defined as 0(zero)?

1177


What are the types of c language?

1079


Explain how can you tell whether two strings are the same?

1077