#559
Se dau 5 numere distincte. Să se determine suma celor mai mari 3 dintre ele.
Problema | 5numere | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57763663 | Utilizator | |
Fișier | numere.cpp | Dimensiune | 899 B |
Data încărcării | 15 Aprilie 2025, 08:42 | Scor / rezultat | Eroare de compilare |
numere.cpp: In function 'int main()': numere.cpp:12:5: error: redeclaration of 'int a' int a, b, c, d, e, s, minim; ^ numere.cpp:5:9: error: 'int a' previously declared here int a,b,c,d,e,s=0,min1,min2; ^ numere.cpp:12:8: error: redeclaration of 'int b' int a, b, c, d, e, s, minim; ^ numere.cpp:5:11: error: 'int b' previously declared here int a,b,c,d,e,s=0,min1,min2; ^ numere.cpp:12:11: error: redeclaration of 'int c' int a, b, c, d, e, s, minim; ^ numere.cpp:5:13: error: 'int c' previously declared here int a,b,c,d,e,s=0,min1,min2; ^ numere.cpp:12:14: error: redeclaration of 'int d' int a, b, c, d, e, s, minim; ^ numere.cpp:5:15: error: 'int d' previously declared here int a,b,c,d,e,s=0,min1,min2; ^ numere.cpp:12:17: error: redeclaration of 'int e' int a, b, c, d, e, s, minim; ^ numere.cpp:5:17: error: 'int e' previously declared here int a,b,c,d,e,s=0,min1,min2; ^ numere.cpp:12:20: error: redeclaration of 'int s' int a, b, c, d, e, s, minim; ^ numere.cpp:5:19: error: 'int s' previously declared here int a,b,c,d,e,s=0,min1,min2; ^ numere.cpp:14:12: error: a function-definition is not allowed here before '{' token int main() { ^ numere.cpp:5:23: warning: unused variable 'min1' [-Wunused-variable] int a,b,c,d,e,s=0,min1,min2; ^ numere.cpp:5:28: warning: unused variable 'min2' [-Wunused-variable] int a,b,c,d,e,s=0,min1,min2; ^ numere.cpp:12:23: warning: unused variable 'minim' [-Wunused-variable] int a, b, c, d, e, s, minim; ^ numere.cpp:50:1: error: expected '}' at end of input } ^
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ă.