139292025-01-09 11:27:43kongopongJárda-L (40)csharpForditási hiba
#include <iostream>

using namespace std;

int main()
{
    int n;
    cin >> n;
    if(n==1)
        cout << 1;
    else{
        if(n==2)
            cout << 2;
        else
            cout << n*n - (n+1);
    }

    return 0;
}
Forditási hiba
open /var/local/lib/isolate/420/box/main.exe: no such file or directory
main.cs(2,0): error CS1024: Wrong preprocessor directive
main.cs(3,6): error CS1525: Unexpected symbol `namespace', expecting `identifier' or `static'
main.cs(3,19): error CS1525: Unexpected symbol `;', expecting `identifier' or `static'
main.cs(7,4): error CS1525: Unexpected symbol `int', expecting `identifier' or `static'
main.cs(12,8): error CS1525: Unexpected symbol `if', expecting `identifier' or `static'
main.cs(16,5): error CS1514: Unexpected symbol `}', expecting `.' or `{'
Compilation failed: 6 error(s), 0 warnings