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

#include<stdio.h>

int main()
{
int c,i,n;
c=0;
scanf("%d",&a);
for(i=2;i<a;i++)
if (n%i==0)
{
c=1;break;
}
if(c!=1)`("prime");
else printf ("not a prime");
}

Is This Answer Correct ?    110 Yes 89 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is 02d in c?

1027


What is cohesion and coupling in c?

983


Write a program to generate the Fibinocci Series

1161


What is preprocessor with example?

997


Explain 'far' and 'near' pointers in c.

1081


What is the difference between call by value and call by reference in c?

1115


Is int a keyword in c?

905


Differentiate between full, complete & perfect binary trees.

1051


In c programming language, how many parameters can be passed to a function ?

1052


how many key words availabel in c a) 28 b) 31 c) 32

1010


How many levels of pointers have?

987


Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.

1045


What are Macros? What are its advantages and disadvantages?

1091


Why we not create function inside function.

2141


i want to know the procedure of qualcomm for getting a job through offcampus

2409