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 / sikendar kumar

#include<stdio.h>
#include<conio.h>

main()
{
int i,n,count=0;
clrscr();
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");
return 0;
}

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When should a far pointer be used?

1060


What is action and transformation in spark?

1082


Explain b+ tree?

1007


A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream

1117


"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks

1062


How can you invoke another program from within a C program?

1023


Explain how do you determine the length of a string value that was stored in a variable?

1093


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

2121


What does %2f mean in c?

1161


Hai what is the different types of versions and their differences

1897


Why is extern used in c?

1050


how to make a scientific calculater ?

2010


What is difference between array and structure in c?

1092


write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34

2108


Explain enumerated types in c language?

991