#4339
pare_impare
Se dau 3
numere naturale a
, b
și c
.
Stabiliți dacă dintre cele trei numere citite sunt mai multe numere pare sau mai multe impare.
Problema | pare_impare | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53945178 | Utilizator | |
Fișier | pare_impare.cpp | Dimensiune | 718 B |
Data încărcării | 15 Noiembrie 2024, 13:23 | Scor / rezultat | Eroare de compilare |
pare_impare.cpp:4:13: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin("paritar.in"); ^ pare_impare.cpp:5:14: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout("paritar.out"); ^ pare_impare.cpp: In function 'int main()': pare_impare.cpp:12:5: error: reference to 'cin' is ambiguous cin >> n; ^ pare_impare.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin("paritar.in"); ^ In file included from pare_impare.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ pare_impare.cpp:15:9: error: reference to 'cin' is ambiguous cin >> x; ^ pare_impare.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin("paritar.in"); ^ In file included from pare_impare.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ pare_impare.cpp:21:9: error: reference to 'cin' is ambiguous cin >> x; ^ pare_impare.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin("paritar.in"); ^ In file included from pare_impare.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ pare_impare.cpp:25:41: error: reference to 'cout' is ambiguous if(max1 == 0 && min1 == 2000000000) cout << "DA"; ^ pare_impare.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("paritar.out"); ^ In file included from pare_impare.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ pare_impare.cpp:26:46: error: reference to 'cout' is ambiguous else if(max2 == 0 && min2 == 2000000000) cout << "DA"; ^ pare_impare.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("paritar.out"); ^ In file included from pare_impare.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ pare_impare.cpp:27:41: error: reference to 'cout' is ambiguous else if(max1 < min2 && max2 < min1) cout << "DA"; ^ pare_impare.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("paritar.out"); ^ In file included from pare_impare.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ pare_impare.cpp:28:10: error: reference to 'cout' is ambiguous else cout << "NU"; ^ pare_impare.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("paritar.out"); ^ In file included from pare_impare.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema pare_impare 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ă.