Computer Science, asked by varsuvk, 2 months ago

Write program input a number and check prime or not also check perfect or not​

Answers

Answered by ayush985890
0

Answer:

int main(){

int a,i;

cin>>a>>endl;

for(i=2;i<a;i++)

{

if(a%i==0){

cout<<"not prime"<<endl;

break;

}

}

if(i==a){

cout<<"prime"<<endl;

}

Answered by RounakRaj007
0

This program will help you.

THANK YOU,

THANK YOU,IF IT HELPED YOU THEN MARK IT AS

THE BRAINLIEST ONE.

Attachments:
Similar questions