2331 | 2023-01-10 15:14:43 | Lonewolf | Bimmbamm (30) | cpp11 | Forditási hiba |
#include <iostream>
using namespace std;
int main()
{
int N;
cin>>N;
string szo;
for(int i=1; i<=N;i++ ){
cin>>szo;
if(i%15==0&& szo!="BUMM"){
cout<<i;
return 0;
}
else if(i%3==0&&szo!="BIMM"){
cout<<i;
return 0;
}
else if(i%5==0&&szo!="BAMM" ){
cout<<i;
return 0;}
else if( i%3 !=0 && i%5 !=0 szo!="SZAM"){
cout<<i;
return 0;
}
}
cout<<0;
return 0;
}
exit status 1
main.cpp: In function 'int main()':
main.cpp:23:36: error: expected ')' before 'szo'
23 | else if( i%3 !=0 && i%5 !=0 szo!="SZAM"){
| ~ ^~~~
| )
Exited with error status 1