#3275
nrSumCifMax
Se dau 3
numere naturale, fiecare având câte două cifre. Afișați-le pe acelea care au suma cifrelor maximă.
CNFB - Concurs de pregatire, clasa a 5-a
Problema | nrSumCifMax | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54204129 | Utilizator | |
Fișier | nrsumcifmax.cpp | Dimensiune | 401 B |
Data încărcării | 22 Noiembrie 2024, 08:44 | Scor / rezultat | Eroare de compilare |
nrsumcifmax.cpp: In function 'int main()': nrsumcifmax.cpp:15:16: error: no match for 'operator=' (operand types are 'std::basic_ostream<char>' and 'int') cout<<a=max; ^ nrsumcifmax.cpp:15:16: note: candidate is: In file included from /usr/include/c++/4.8/iostream:39:0, from nrsumcifmax.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>&' nrsumcifmax.cpp:19:16: error: no match for 'operator=' (operand types are 'std::basic_ostream<char>' and 'int') cout<<b=max; ^ nrsumcifmax.cpp:19:16: note: candidate is: In file included from /usr/include/c++/4.8/iostream:39:0, from nrsumcifmax.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>&' nrsumcifmax.cpp:23:16: error: no match for 'operator=' (operand types are 'std::basic_ostream<char>' and 'int') cout<<c=max; ^ nrsumcifmax.cpp:23:16: note: candidate is: In file included from /usr/include/c++/4.8/iostream:39:0, from nrsumcifmax.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 nrSumCifMax 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ă.