#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 | #64481705 | Utilizator | |
| Fișier | numere.c | Dimensiune | 942 B |
| Data încărcării | 10 Mai 2026, 10:27 | Scor/rezultat | Eroare de compilare |
numere.c: In function ‘main’: numere.c:25:12: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 25 | } else if (c > max3) | ^~ numere.c:28:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 28 | if (d > max) { | ^~ numere.c:35:12: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 35 | } else if (d > max3) | ^~ numere.c:38:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 38 | if (e > max) { | ^~ numere.c:48:18: error: ‘Sum’ undeclared (first use in this function) 48 | printf("%d", Sum); | ^~~ numere.c:48:18: note: each undeclared identifier is reported only once for each function it appears in numere.c:6:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d%d%d%d%d", &a, &b, &c, &d, &e); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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ă.