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

#include<stdio.h>
#include<conio.h>
void main()
{
int num,i=2;
clrscr();
printf("\n entert a number");
scanf("%d",&num);
while(c<=num-1)
{
if(num%i==0)
{
printf("given number is not a prime number\n");
break;
}
i++;
}
if(i==num);
printf(given number is a prime number\n");
getch();
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does 3 mean in texting?

1162


What is uint8 in c?

1160


What is a rvalue?

1259


Explain what is the general form of a c program?

1138


What is define directive?

1212


What are the advantages and disadvantages of a heap?

1258


Which control loop is recommended if you have to execute set of statements for fixed number of times?

1405


If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?

1307


What should malloc() do? Return a null pointer or a pointer to 0 bytes?

1134


Is file a keyword in c?

980


How do I round numbers?

1051


What would be an example of a structure analogous to structure c?

1047


What is the difference between exit() and _exit() function?

1097


What are the types of functions in c?

1034


What is array of structure in c?

1249