#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 | #52431399 | Utilizator | |
Fișier | numere.cpp | Dimensiune | 322 B |
Data încărcării | 30 Septembrie 2024, 09:52 | Scor / rezultat | Eroare de compilare |
numere.cpp: In function 'int main()': numere.cpp:7:10: error: 'i' was not declared in this scope for (i=1, i<=5); ^ numere.cpp:7:19: error: expected ';' before ')' token for (i=1, i<=5); ^ numere.cpp:8:10: error: 'x' was not declared in this scope cin>>x; ^ numere.cpp:9:5: error: expected primary-expression before 'if' if (x>m1 && x<m2) (m1=x); ^ numere.cpp:9:5: error: expected ')' before 'if' numere.cpp:9:11: error: 'm1' was not declared in this scope if (x>m1 && x<m2) (m1=x); ^ numere.cpp:9:19: error: 'm2' was not declared in this scope if (x>m1 && x<m2) (m1=x); ^ numere.cpp:10:24: error: 'm3' was not declared in this scope else if (x>m2 && x<m3); ^ numere.cpp:12:9: error: 'm1' was not declared in this scope m1=m2; ^ numere.cpp:12:12: error: 'm2' was not declared in this scope m1=m2; ^ numere.cpp:13:12: error: 'x' was not declared in this scope m2=x; ^ numere.cpp:15:5: error: 'else' without a previous 'if' else if (x2>m3); ^ numere.cpp:15:14: error: 'x2' was not declared in this scope else if (x2>m3); ^ numere.cpp:15:17: error: 'm3' was not declared in this scope else if (x2>m3); ^ numere.cpp:17:9: error: 'm1' was not declared in this scope m1=m2 ^ numere.cpp:17:12: error: 'm2' was not declared in this scope m1=m2 ^ numere.cpp:18:9: error: expected ';' before 'm2' m2=m3 ^ numere.cpp:21:12: error: 'm1' was not declared in this scope cout <<m1+m2+m3; ^ numere.cpp:21:15: error: 'm2' was not declared in this scope cout <<m1+m2+m3; ^ numere.cpp:21:18: error: 'm3' was not declared in this scope cout <<m1+m2+m3; ^
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ă.