0

prime number

11th Dec 2017, 9:39 AM
eddy
2 Réponses
+ 2
int main() { int n,a,CH=0; cin>>n; for(a=0;a<n;a++) { if(n%a==0){ CH+=1; } } if(CH>=1) cout<<"\n The number is not prime "; else cout<<" \n The number is prime "; return 0; }
11th Dec 2017, 10:16 AM
RZK 022
RZK 022 - avatar