#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 | #52440974 | Utilizator | |
Fișier | max2.cpp | Dimensiune | 217 B |
Data încărcării | 30 Septembrie 2024, 13:01 | Scor / rezultat | Eroare de compilare |
max2.cpp:1:1: error: 'include' does not name a type include<iostream> ^ max2.cpp: In function 'int main()': max2.cpp:6:5: error: 'cin' was not declared in this scope cin a>>; ^ max2.cpp:6:9: error: expected ';' before 'a' cin a>>; ^ In file included from /usr/include/c++/4.8/iostream:38:0, from max2.cpp:7: /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:184:1: error: 'namespace' definition is not allowed here namespace std ^ /usr/include/c++/4.8/bits/memoryfwd.h:50:15: error: expected '=' before '__attribute__' namespace std _GLIBCXX_VISIBILITY(default) ^ /usr/include/c++/4.8/bits/memoryfwd.h:50:15: error: expected identifier before '__attribute__' /usr/include/c++/4.8/bits/memoryfwd.h:50:15: error: expected ';' before '__attribute__' /usr/include/c++/4.8/bits/memoryfwd.h:50:15: error: expected primary-expression before '__attribute__' /usr/include/c++/4.8/bits/memoryfwd.h:50:15: error: expected ';' before '__attribute__' /usr/include/c++/4.8/bits/stringfwd.h:42:15: error: expected '=' before '__attribute__' namespace std _GLIBCXX_VISIBILITY(default) ^ /usr/include/c++/4.8/bits/stringfwd.h:42:15: error: expected identifier before '__attribute__' /usr/include/c++/4.8/bits/stringfwd.h:42:15: error: expected ';' before '__attribute__' /usr/include/c++/4.8/bits/stringfwd.h:42:15: error: expected primary-expression before '__attribute__' /usr/include/c++/4.8/bits/stringfwd.h:42:15: error: expected ';' before '__attribute__' In file included from /usr/include/features.h:374:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:426, from /usr/include/c++/4.8/iostream:38, from max2.cpp:7: /usr/include/wchar.h:132:1: error: expected unqualified-id before string constant __BEGIN_DECLS ^ In file included from /usr/include/c++/4.8/ios:39:0, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from max2.cpp:7: /usr/include/c++/4.8/exception:35:37: error: expected '}' before end of line #pragma GCC visibility push(default) ^ /usr/include/c++/4.8/exception: At global scope: /usr/include/c++/4.8/exception:35:37: error: expected declaration before end of line
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ă.