#105
max2
Să se scrie un program care determină maximul a două numere întregi citite de la tastatură.
Problema | max2 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #55067602 | Utilizator | |
Fișier | max2.cpp | Dimensiune | 175 B |
Data încărcării | 19 Decembrie 2024, 23:47 | Scor / rezultat | Eroare de compilare |
max2.cpp:2:7: error: expected nested-name-specifier before 'namepace' using namepace std; ^ max2.cpp:2:7: error: 'namepace' has not been declared max2.cpp:2:16: error: expected ';' before 'std' using namepace std; ^ max2.cpp:2:16: error: 'std' does not name a type max2.cpp: In function 'int main()': max2.cpp:5:3: error: 'cin' was not declared in this scope cin>>a>>b; ^ max2.cpp:5:3: note: suggested alternative: In file included from max2.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ max2.cpp:7:4: error: 'cout' was not declared in this scope { cout<<a<<endl;} ^ max2.cpp:7:4: note: suggested alternative: In file included from max2.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ max2.cpp:7:13: error: 'endl' was not declared in this scope { cout<<a<<endl;} ^ max2.cpp:7:13: note: suggested alternative: In file included from /usr/include/c++/4.8/iostream:39:0, from max2.cpp:1: /usr/include/c++/4.8/ostream:564:5: note: 'std::endl' endl(basic_ostream<_CharT, _Traits>& __os) ^ max2.cpp:9:3: error: 'cout' was not declared in this scope {cout<<b<<endl;} ^ max2.cpp:9:3: note: suggested alternative: In file included from max2.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ max2.cpp:9:12: error: 'endl' was not declared in this scope {cout<<b<<endl;} ^ max2.cpp:9:12: note: suggested alternative: In file included from /usr/include/c++/4.8/iostream:39:0, from max2.cpp:1: /usr/include/c++/4.8/ostream:564:5: note: 'std::endl' endl(basic_ostream<_CharT, _Traits>& __os) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema max2 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ă.