#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 | #53800848 | Utilizator | |
Fișier | nrsumcifmax.cpp | Dimensiune | 290 B |
Data încărcării | 12 Noiembrie 2024, 08:48 | Scor / rezultat | Eroare de compilare |
nrsumcifmax.cpp:3:1: error: expected nested-name-specifier before 'int' int main() ^ nrsumcifmax.cpp:3:1: error: expected unqualified-id before 'int' nrsumcifmax.cpp:3:1: error: expected ';' before 'int' nrsumcifmax.cpp: In function 'int main()': nrsumcifmax.cpp:5:1: error: 'cin' was not declared in this scope cin>>a>>b>>c; ^ nrsumcifmax.cpp:5:1: note: suggested alternative: In file included from nrsumcifmax.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ nrsumcifmax.cpp:13:14: error: 'cout' was not declared in this scope if(sa==smax) cout<<a<<" "; ^ nrsumcifmax.cpp:13:14: note: suggested alternative: In file included from nrsumcifmax.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ nrsumcifmax.cpp:14:14: error: 'cout' was not declared in this scope if(sb==smax) cout<<b<<" "; ^ nrsumcifmax.cpp:14:14: note: suggested alternative: In file included from nrsumcifmax.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ nrsumcifmax.cpp:15:14: error: 'cout' was not declared in this scope if(sc==smax) cout<<c<<" "; ^ nrsumcifmax.cpp:15:14: note: suggested alternative: In file included from nrsumcifmax.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^
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ă.