#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 | #54720216 | Utilizator | |
Fișier | nrsumcifmax.cpp | Dimensiune | 478 B |
Data încărcării | 06 Decembrie 2024, 11:12 | Scor / rezultat | Eroare de compilare |
nrsumcifmax.cpp:2:1: error: 'include' does not name a type include <iostream> ^ nrsumcifmax.cpp: In function 'int main()': nrsumcifmax.cpp:7:5: error: expected initializer before 'int' int s = 0; ^ nrsumcifmax.cpp:8:11: error: 'a' was not declared in this scope while(a) s+=a%10, a/=10; ^ nrsumcifmax.cpp:8:14: error: 's' was not declared in this scope while(a) s+=a%10, a/=10; ^ nrsumcifmax.cpp:10:5: error: 'cin' was not declared in this scope cin >> a >> b >> c; ^ nrsumcifmax.cpp:11:12: error: 'sc' was not declared in this scope if(sc(a) > maxi) ^ nrsumcifmax.cpp:13:12: error: 'sc' was not declared in this scope if(sc(b) > maxi) ^ nrsumcifmax.cpp:15:12: error: 'sc' was not declared in this scope if(sc(c) > maxi) ^ nrsumcifmax.cpp:17:12: error: 'sc' was not declared in this scope if(sc(a) == maxi) ^ nrsumcifmax.cpp:18:9: error: 'cout' was not declared in this scope cout << a << ' '; ^ nrsumcifmax.cpp:19:12: error: 'sc' was not declared in this scope if(sc(b) == maxi) ^ nrsumcifmax.cpp:20:9: error: 'cout' was not declared in this scope cout << b << ' '; ^ nrsumcifmax.cpp:21:12: error: 'sc' was not declared in this scope if(sc(c) == maxi) ^ nrsumcifmax.cpp:22:9: error: 'cout' was not declared in this scope cout << c << ' '; ^
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ă.