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 / venkat reddy

#include<stdio.h>
main()
{
int i,n,count=0;
printf("enter a no.");
scanf("%d",&n);
for(i=2;i<n;i++)

{
if(n%i==0)
{
count++;
}
}
if(count>1)
{
printf("not prime no.");

}
else
printf("prime");
}

Is This Answer Correct ?    344 Yes 155 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is FIFO?

1562


What is wrong in this statement? scanf(ā€œ%dā€,whatnumber);

1199


What is the difference between NULL and NUL?

1253


What are the characteristics of arrays in c?

997


What does printf does?

1201


praagnovation

2233


What is indirection in c?

1036


code for replace tabs with equivalent number of blanks

2107


What is the difference between abs() and fabs() functions?

1073


Which node is more powerful and can handle local information processing or graphics processing?

1273


What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.

4258


Linked list is a Linear or non linear explain if linear how it working as a non linear data structures

2132


What are directives in c?

933


What are keywords in c with examples?

1050


Can you please explain the difference between malloc() and calloc() function?

1064