#559
5numere
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 | #18823567 | Utilizator | |
Fișier | 5numere.cpp | Dimensiune | 497 B |
Data încărcării | 18 Noiembrie 2019, 11:23 | Scor / rezultat | Eroare de compilare |
5numere.cpp: In function 'int main()': 5numere.cpp:6:9: error: 'n1' was not declared in this scope if (n1<n2 || n1<n3 || n1<n4 || n1<n5) ^ 5numere.cpp:6:12: error: 'n2' was not declared in this scope if (n1<n2 || n1<n3 || n1<n4 || n1<n5) ^ 5numere.cpp:6:21: error: 'n3' was not declared in this scope if (n1<n2 || n1<n3 || n1<n4 || n1<n5) ^ 5numere.cpp:6:30: error: 'n4' was not declared in this scope if (n1<n2 || n1<n3 || n1<n4 || n1<n5) ^ 5numere.cpp:6:39: error: 'n5' was not declared in this scope if (n1<n2 || n1<n3 || n1<n4 || n1<n5) ^ 5numere.cpp:10:9: error: 'n2' was not declared in this scope if (n2<n1 || n1<n3 || n1<n4 || n1<n5) ^ 5numere.cpp:10:12: error: 'n1' was not declared in this scope if (n2<n1 || n1<n3 || n1<n4 || n1<n5) ^ 5numere.cpp:10:21: error: 'n3' was not declared in this scope if (n2<n1 || n1<n3 || n1<n4 || n1<n5) ^ 5numere.cpp:10:30: error: 'n4' was not declared in this scope if (n2<n1 || n1<n3 || n1<n4 || n1<n5) ^ 5numere.cpp:10:39: error: 'n5' was not declared in this scope if (n2<n1 || n1<n3 || n1<n4 || n1<n5) ^ 5numere.cpp:14:9: error: 'n3' was not declared in this scope if (n3<n1 || n3<n2 || n1<n4 || n1<n5) ^ 5numere.cpp:14:12: error: 'n1' was not declared in this scope if (n3<n1 || n3<n2 || n1<n4 || n1<n5) ^ 5numere.cpp:14:21: error: 'n2' was not declared in this scope if (n3<n1 || n3<n2 || n1<n4 || n1<n5) ^ 5numere.cpp:14:30: error: 'n4' was not declared in this scope if (n3<n1 || n3<n2 || n1<n4 || n1<n5) ^ 5numere.cpp:14:39: error: 'n5' was not declared in this scope if (n3<n1 || n3<n2 || n1<n4 || n1<n5) ^ 5numere.cpp:18:9: error: 'n4' was not declared in this scope if (n4<n1 || n4<n2 || n1<n3 || n1<n5) ^ 5numere.cpp:18:12: error: 'n1' was not declared in this scope if (n4<n1 || n4<n2 || n1<n3 || n1<n5) ^ 5numere.cpp:18:21: error: 'n2' was not declared in this scope if (n4<n1 || n4<n2 || n1<n3 || n1<n5) ^ 5numere.cpp:18:30: error: 'n3' was not declared in this scope if (n4<n1 || n4<n2 || n1<n3 || n1<n5) ^ 5numere.cpp:18:39: error: 'n5' was not declared in this scope if (n4<n1 || n4<n2 || n1<n3 || n1<n5) ^ 5numere.cpp:22:9: error: 'n5' was not declared in this scope if (n5<n2 || n1<n3 || n1<n4 || n1<n1) ^ 5numere.cpp:22:12: error: 'n2' was not declared in this scope if (n5<n2 || n1<n3 || n1<n4 || n1<n1) ^ 5numere.cpp:22:18: error: 'n1' was not declared in this scope if (n5<n2 || n1<n3 || n1<n4 || n1<n1) ^ 5numere.cpp:22:21: error: 'n3' was not declared in this scope if (n5<n2 || n1<n3 || n1<n4 || n1<n1) ^ 5numere.cpp:22:30: error: 'n4' was not declared in this scope if (n5<n2 || n1<n3 || n1<n4 || n1<n1) ^ 5numere.cpp:26:7: error: 'n1' was not declared in this scope s=n1+n2+n3+n4+n5; ^ 5numere.cpp:26:10: error: 'n2' was not declared in this scope s=n1+n2+n3+n4+n5; ^ 5numere.cpp:26:13: error: 'n3' was not declared in this scope s=n1+n2+n3+n4+n5; ^ 5numere.cpp:26:16: error: 'n4' was not declared in this scope s=n1+n2+n3+n4+n5; ^ 5numere.cpp:26:19: error: 'n5' was not declared in this scope s=n1+n2+n3+n4+n5; ^ 5numere.cpp:5:9: warning: unused variable 'a' [-Wunused-variable] int a,b,c,d,e,s,min; ^ 5numere.cpp:5:11: warning: unused variable 'b' [-Wunused-variable] int a,b,c,d,e,s,min; ^ 5numere.cpp:5:13: warning: unused variable 'c' [-Wunused-variable] int a,b,c,d,e,s,min; ^ 5numere.cpp:5:15: warning: unused variable 'd' [-Wunused-variable] int a,b,c,d,e,s,min; ^ 5numere.cpp:5:17: warning: unused variable 'e' [-Wunused-variable] int a,b,c,d,e,s,min; ^ 5numere.cpp:5:21: warning: unused variable 'min' [-Wunused-variable] int a,b,c,d,e,s,min; ^
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ă.