Anonymous

Write A Function Prime That Returns 1 If Its Argument Is A Prime Number And Returns Zero Otherwise?

1

1 Answers

Alongbar Daimary Profile
Hi! Here it the Program. #include<iostream.h> int CheckPrime(int number){     for(int I=2;I<number;I++){    if(number%I==0)    return 0;     }     return 1; } void main() { int num=7; cout<<CheckPrime(num); }

Answer Question

Anonymous