74362024-01-09 08:32:07BenedekMartonBimmbamm (30)csharpCompilation error
#include <iostream>
#include <cstring>

using namespace std;

int main()
{
    int n;
    char x[5];
    cin >> n;
    for(int i=1; i<=n; i++)
    {
        cin >> x;
        //cout << strcmp(x, "SZAM");
        if(strcmp(x, "SZAM")==0)
        {
            if(i%3==0 or i%5==0)
            {
                cout << i;
                return 0;
            }
        }
        else if(strcmp(x, "BIMM")==0)
        {
            if(i%3!=0 or i%5==0)
            {
                cout << i;
                return 0;
            }
        }
        else if(strcmp(x, "BAMM")==0)
        {
            if(i%3==0 or i%5!=0)
            {
                cout << i;
                return 0;
            }
        }
        else if(strcmp(x, "BUMM")==0)
        {
            if(!i%3==0 or i%5!=0)
            {
                cout << i;
                return 0;
            }
        }
    }
    cout << 0;
    return 0;
}
Compilation error
exit status 1
main.cs(2,0): error CS1024: Wrong preproces