#559
Se dau 5 numere distincte. Să se determine suma celor mai mari 3 dintre ele.
| Problema | 5numere | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #62577960 | Utilizator | |
| Fișier | numere.cpp | Dimensiune | 501 B |
| Data încărcării | 26 Ianuarie 2026, 15:15 | Scor/rezultat | Eroare de compilare |
numere.cpp: In function 'int main()': numere.cpp:10:5: error: 'else' without a previous 'if' else alpha=b; ^ numere.cpp:16:5: error: 'else' without a previous 'if' else if (c<beta) beta=c; ^ numere.cpp:21:5: error: 'else' without a previous 'if' else if (d<beta) beta=d; ^ numere.cpp:26:5: error: 'else' without a previous 'if' else if (e<beta) beta=e; ^ numere.cpp:28:24: error: 'x' was not declared in this scope cout << (a+b+c+d+e) - (x+y) ^ numere.cpp:28:26: error: 'y' was not declared in this scope cout << (a+b+c+d+e) - (x+y) ^ numere.cpp:29:1: error: expected ';' before 'return' return 0; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema 5numere 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ă.