answersLogoWhite

0

#include <iostream.h>

main()

{

int a;

cout<<"enter a number : ";

cin>>a;

cout<<endl;

if (a%2-1)

cout<<"it is a Prime number";

else

cout<<"it is not a prime number"

return 0;

}

------------------------------------------

output: enter a number : 30

it is a not a prime number

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What are prime number and composite numbers?

a prime number is a number that you can plus by one


What prime number plus what prime number will give you 54?

47 + 7


What is prime plus prime?

A prime plus another prime is at the very least going to be an even number since all primes (with the exception of 2) are odd.


Does x squared plus x plus 41 always equal a prime number?

No. it's not a prime number when x = 40, 41, 81,82 ...


Is number 5x3x17 plus 17 a prime number?

No. (5x3x17) + 17 =255 + 17 =272 (This is not prime.)


Is 2187 plus 36295 a prime number?

No. The number 38,482 is composite.


What is the smallest number for n for which n2 plus n plus 17 is not a prime number?

n = 5.


Which country has dialing code plus 278?

The dialing code +278 does not correspond to a specific country. In international phone numbering, the plus sign (+) is used to represent the international dialing code needed to make a call from one country to another. The number 278 could be a part of a longer phone number, but it does not uniquely identify a country on its own. To determine the country associated with a dialing code, the full number including the country code must be provided.


Is 9x3 plus 12x2 a prime number?

yes


What is the sum of the smallest odd prime number and the largest prime number less than 100?

It is: 3 plus 97 = 100


Testing c plus plus code prime number?

Use the following function to determine if a whole number is prime, including negative values: bool isprime(int p) { if(p&lt;0) p*=(-1); // convert to positive integer if( p&lt;2 ( p&gt;2 &amp;&amp; p&amp;1==0 )) return( false ); int max = (int)sqrt((double) p)+1; for( int i=3; i&lt;=max; i+=2 ) if( p%i==0 ) return( false ); return( true ); }


What is P plus P plus N in prime numbers?

It would always be a natural number.