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

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

void main()
{
int a,i , b,flag=0,no;
clrscr();

for(no=2;no<100;no++)
{
for(i=2;i<no;i++)
{
b=no%i;
if(b==0)
{
flag=1;
break;
}
else
{
flag=0;
}
}
if(flag!=1)
{
printf("\n%d",no);
}
}

getch();
}

Is This Answer Correct ?    7 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you be sure that a program follows the ANSI C standard?

1614


What is the explanation for prototype function in c?

988


Explain how can I avoid the abort, retry, fail messages?

1059


What is a program?

1272


What are the types of operators in c?

1067


can anyone please tell about the nested interrupts?

2125


hi, which software companys will take,if d candidate's % is jst 55%?

2093


what are the facialities provided by you after the selection of the student.

2265


What is calloc() function?

1111


What is s or c?

1066


Is void a keyword in c?

987


What is the meaning of ?

1041


What is the difference between c and python?

1184


Explain what are the __date__ and __time__ preprocessor commands?

1130


Why static is used in c?

1096