0
#include<iostream> using namespace std; int pri(int a) {int i; for(i=2;i<a;i++) if(a%i==0) return 0; else return 1;} int main(){
2 Respostas
+ 1
Your code showing incomplete i think u made program for prime numbers right . Your main function is missing
#include<iostream>
using namespace std;
int prime(int a)
{
for(int i=2;i<a;i++)
{
if(a%i==0)
return 0;
else
return 1;
}
}
int main(){
cout<<prime(7);
return 0;
}
+ 1
thank you