#3053
EvenOddXXL
Se dă un număr natural n
. Să se determine paritatea lui. Dacă numărul este par se afișează Par
, altfel se afișează Impar
.
Problema | EvenOddXXL | Operații I/O |
![]() evenoddxxl.in /evenoddxxl.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #41370589 | Utilizator | |
Fișier | evenoddxxl.cpp | Dimensiune | 242 B |
Data încărcării | 20 Ianuarie 2023, 17:22 | Scor / rezultat | Eroare de compilare |
evenoddxxl.cpp:4:14: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin ("evenoddxxl.in"); ^ evenoddxxl.cpp:5:15: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout ("evenoddxxl.out"); ^ evenoddxxl.cpp: In function 'int main()': evenoddxxl.cpp:10:4: error: reference to 'cin' is ambiguous cin >>s; ^ evenoddxxl.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin ("evenoddxxl.in"); ^ In file included from evenoddxxl.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ evenoddxxl.cpp:12:18: error: reference to 'cout' is ambiguous if (x%2 == 0) cout << Par; ^ evenoddxxl.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout ("evenoddxxl.out"); ^ In file included from evenoddxxl.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ evenoddxxl.cpp:12:26: error: 'Par' was not declared in this scope if (x%2 == 0) cout << Par; ^ evenoddxxl.cpp:13:9: error: reference to 'cout' is ambiguous else cout << Impar; ^ evenoddxxl.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout ("evenoddxxl.out"); ^ In file included from evenoddxxl.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ evenoddxxl.cpp:13:17: error: 'Impar' was not declared in this scope else cout << Impar; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema EvenOddXXL face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.