int prime(int d){
int e=0;
do
{
for (int i=2;i<d;i++){
if (d%i==0){e=e;}
else{e+=1;}
d+=1;
cout<<e<<endl;
}
while(e!=20);
return e;
}
int main(){
int c;
cout<<prime(c);
return 0;
}
int prime(int d)
{
int e=0;
do
{
for(int i=2;i<d;i++)
{
if (d%i==0){e=e;}
else{e+=1;}
d+=1;
cout<<e<<endl;
}
while(e!=20); /* while can't be here */
return e;
} //*while should go here
} // added here a missing closing brace
int main(){
int c;
cout<<prime(c);
return 0;
}
int prime(int d)
{
int e=0;
do
{
for(int i=2;i<d;i++)
{
if (d%i==0){e=e;}
else{e+=1;}
d+=1;
cout<<e<<endl;
}
}while(e!=20);
return e;
}
int main(){
int c;
cout<<prime(c);
return 0;
}