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 a program to print all the prime numbers with in the
given range

Answer Posted / chavidi

void prime(int a,int b)
{
int i,j,c
for(i=a;i<=b;i++)
{
c=0;
for(j=1;j<=a;j++)
{
if(a%j==0)
{
c++;
}
}
if(c==2)
printf(i);
}
}

Is This Answer Correct ?    8 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is adt in c programming?

1174


What is array of structure in c?

1191


What is pointers in c?

1124


Explain how can I convert a number to a string?

1157


What language is lisp written in?

1276


What is data structure in c programming?

1088


Explain c preprocessor?

1122


Do you know what are the properties of union in c?

1087


can anyone suggest some site name..where i can get some good data structure puzzles???

2088


List the difference between a "copy constructor" and a "assignment operator"?

1026


What do you mean by recursion in c?

1119


Why is it usually a bad idea to use gets()? Suggest a workaround.

1799


Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.

1339


What’s a signal? Explain what do I use signals for?

1119


a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above

1122