#3620
cmmk
Se dau numerele naturale n
și k
, unde k
este o cifră. Să se verifice dacă toate cifrele lui n
sunt mai mici sau egale decât k
.
Problema | cmmk | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #46347748 | Utilizator | |
Fișier | cmmk.cpp | Dimensiune | 652 B |
Data încărcării | 11 Noiembrie 2023, 10:33 | Scor / rezultat | Eroare de compilare |
cmmk.cpp: In function 'int main()': cmmk.cpp:18:5: error: 'cout' was not declared in this scope cout << "Enter a natural number (n): "; ^ cmmk.cpp:18:5: note: suggested alternative: In file included from cmmk.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ cmmk.cpp:19:5: error: 'cin' was not declared in this scope cin >> n; ^ cmmk.cpp:19:5: note: suggested alternative: In file included from cmmk.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ cmmk.cpp:25:80: error: 'endl' was not declared in this scope cout << "All digits of " << n << " are less than or equal to " << k << endl; ^ cmmk.cpp:25:80: note: suggested alternative: In file included from /usr/include/c++/4.8/iostream:39:0, from cmmk.cpp:1: /usr/include/c++/4.8/ostream:564:5: note: 'std::endl' endl(basic_ostream<_CharT, _Traits>& __os) ^ cmmk.cpp:27:83: error: 'endl' was not declared in this scope cout << "Not all digits of " << n << " are less than or equal to " << k <<endl; ^ cmmk.cpp:27:83: note: suggested alternative: In file included from /usr/include/c++/4.8/iostream:39:0, from cmmk.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 cmmk 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ă.