127382024-12-29 16:16:29ffteklaVilágnaptár (45 pont)cpp17Forditási hiba
#include <iostream>

using namespace std;

int ev,honap,nap;
int main()
{
    cin>>ev>>honap>>nap;

    if (ev%4!=0) //nem szokoev
    {
        if (honap==12 && nap==31) cout<<ev<<" "<<honap<<" "<<"VN";
          else cout<<ev<<" "<<honap<<" "<<nap;
    }

    else //szokoev
    {
        if (honap<6) cout<<ev<<" "<<honap<<" "<<nap;
        else if (honap>=7)
        {
            if (honap==7 && nap==1) cout<<ev<<" "<<honap-1<<" "<<"SZN";
            else if (honap==1 || honap==4 || honap==10 && nap==1) cout<<ev<<" "<<honap-1<<" "<<"30";
            else if (honap!=1 && honap!=4 && honap!=10 && nap==1) cout<<ev<<" "<<honap-1<<" "<<"31";
            else if (nap!=1) cout<<ev<<" "<<honap<<" "<<nap-1;
        }
    }
    else if (ev-1%4==0)
    {
        if (honap==1 && nap==1) cout<<ev-1<<" "<<"12"<<" "<<"VN";
        else cout<<ev<<" "<<honap<<" "<<nap;
    }
}
Forditási hiba
open /var/local/lib/isolate/412/box/a.out: no such file or directory
main.cpp: In function 'int main()':
main.cpp:27:5: error: 'else' without a previous 'if'
   27 |     else if (ev-1%4==0)
      |     ^~~~