#449
nrcif
Se citește de la tastatură un număr natural de maxim 3
cifre. Să se determine câte cifre are.
Problema | nrcif | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #55081525 | Utilizator | |
Fișier | nrcif.cpp | Dimensiune | 211 B |
Data încărcării | 21 Decembrie 2024, 11:55 | Scor / rezultat | Eroare de compilare |
nrcif.cpp: In function 'int main()': nrcif.cpp:10:12: error: no match for 'operator=' (operand types are 'std::basic_ostream<char>' and 'int') cout<<n=1; ^ nrcif.cpp:10:12: note: candidate is: In file included from /usr/include/c++/4.8/iostream:39:0, from nrcif.cpp:1: /usr/include/c++/4.8/ostream:58:11: note: std::basic_ostream<char>& std::basic_ostream<char>::operator=(const std::basic_ostream<char>&) <deleted> class basic_ostream : virtual public basic_ios<_CharT, _Traits> ^ /usr/include/c++/4.8/ostream:58:11: note: no known conversion for argument 1 from 'int' to 'const std::basic_ostream<char>&' nrcif.cpp:12:12: error: no match for 'operator=' (operand types are 'std::basic_ostream<char>' and 'int') cout<<n=2; ^ nrcif.cpp:12:12: note: candidate is: In file included from /usr/include/c++/4.8/iostream:39:0, from nrcif.cpp:1: /usr/include/c++/4.8/ostream:58:11: note: std::basic_ostream<char>& std::basic_ostream<char>::operator=(const std::basic_ostream<char>&) <deleted> class basic_ostream : virtual public basic_ios<_CharT, _Traits> ^ /usr/include/c++/4.8/ostream:58:11: note: no known conversion for argument 1 from 'int' to 'const std::basic_ostream<char>&' nrcif.cpp:14:12: error: no match for 'operator=' (operand types are 'std::basic_ostream<char>' and 'int') cout<<n=3; ^ nrcif.cpp:14:12: note: candidate is: In file included from /usr/include/c++/4.8/iostream:39:0, from nrcif.cpp:1: /usr/include/c++/4.8/ostream:58:11: note: std::basic_ostream<char>& std::basic_ostream<char>::operator=(const std::basic_ostream<char>&) <deleted> class basic_ostream : virtual public basic_ios<_CharT, _Traits> ^ /usr/include/c++/4.8/ostream:58:11: note: no known conversion for argument 1 from 'int' to 'const std::basic_ostream<char>&'
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema nrcif 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ă.