#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 | #51396616 | Utilizator | |
Fișier | pare_impare.cpp | Dimensiune | 715 B |
Data încărcării | 12 Iunie 2024, 16:10 | Scor / rezultat | Eroare de compilare |
pare_impare.cpp: In function 'int main()': pare_impare.cpp:9:5: error: reference to 'cin' is ambiguous cin >> n; ^ pare_impare.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("paritar.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from pare_impare.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ pare_impare.cpp:12:9: error: reference to 'cin' is ambiguous cin >> x; ^ pare_impare.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("paritar.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from pare_impare.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ pare_impare.cpp:18:9: error: reference to 'cin' is ambiguous cin >> x; ^ pare_impare.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("paritar.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from pare_impare.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ pare_impare.cpp:22:41: error: reference to 'cout' is ambiguous if(max1 == 0 && min1 == 2000000000) cout << "DA"; ^ pare_impare.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("paritar.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from pare_impare.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ pare_impare.cpp:23:46: error: reference to 'cout' is ambiguous else if(max2 == 0 && min2 == 2000000000) cout << "DA"; ^ pare_impare.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("paritar.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from pare_impare.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ pare_impare.cpp:24:41: error: reference to 'cout' is ambiguous else if(max1 < min2 && max2 < min1) cout << "DA"; ^ pare_impare.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("paritar.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from pare_impare.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ pare_impare.cpp:25:10: error: reference to 'cout' is ambiguous else cout << "NU"; ^ pare_impare.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("paritar.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from pare_impare.cpp:1: /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ă.