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...

check whether a no is prime or not.

Answer Posted / paramjeet singh

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int i,c;
printf("enter any number\n");
scanf("%d",&i);
printf("you have entered=%d\n",i);
for(c=2;c<=i-1;c++)
{
if(i%c==0)
printf("this no.is not a prime number");
}
printf("this is prime number");
getch();
}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does return 0 do in c++?

1081


What do you mean by delegate? Can a user retain delegates?

995


Explain how overloading takes place in c++?

1092


How does a copy constructor differs from an overloaded assignment operator?

1082


What is virtual base class uses?

1446


What is object in c++ wikipedia?

1062


What relational operators if statements in c++?

1233


Write a program using display() function which takes two arguments.

1121


Define vptr.

1092


What is the standard template library (stl)?

1911


How many characters are recognized by ANSI C++?

1465


Explain the volatile and mutable keywords.

1115


which operator is used for performing an exponential operation a) > b) ^ c) none

1110


What are static member functions?

1157


give me an example for testing a program showing the test path .show how the test is important and complex.

2994