#58
CMMDC
Să se scrie un program care să determine cel mai mare divizor comun a două numere naturale citite de la tastatură.
Problema | CMMDC | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54413046 | Utilizator | |
Fișier | cmmdc.cpp | Dimensiune | 193 B |
Data încărcării | 27 Noiembrie 2024, 21:06 | Scor / rezultat | Eroare de compilare |
cmmdc.cpp: In function 'int main()': cmmdc.cpp:5:5: error: 'cin' was not declared in this scope cin>>n>>m; ^ cmmdc.cpp:5:5: note: suggested alternative: In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from cmmdc.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ cmmdc.cpp:11:5: error: 'cout' was not declared in this scope cout<<n<<endl; ^ cmmdc.cpp:11:5: note: suggested alternative: In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from cmmdc.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ cmmdc.cpp:11:14: error: 'endl' was not declared in this scope cout<<n<<endl; ^ cmmdc.cpp:11:14: note: suggested alternative: In file included from /usr/include/c++/4.8/istream:39:0, from /usr/include/c++/4.8/sstream:38, from /usr/include/c++/4.8/complex:45, from /usr/include/c++/4.8/ccomplex:38, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:52, from cmmdc.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 CMMDC 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ă.