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

in linking some of os executables are linking name some of them

2128


Why do we use c for the speed of light?

1202


What is uint8 in c?

1102


Write a program for Overriding.

1158


What is the size of empty structure in c?

1078


hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..

1907


What are the preprocessor categories?

1059


What is difference between arrays and pointers?

1070


How can I sort more data than will fit in memory?

1107


What is declaration and definition in c?

1086


what do you mean by inline function in C?

1053


Explain what is the difference between far and near ?

1103


What are data types in c language?

1057


What is a lookup table in c?

1120


What Is The Difference Between Null And Void Pointer?

1250