#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 | #64693267 | Utilizator | |
| Fișier | numere.cpp | Dimensiune | 698 B |
| Data încărcării | 23 Mai 2026, 20:46 | Scor/rezultat | Eroare de compilare |
numere.cpp:1:2: error: stray ‘#’ in program 1 | x#include<iostream> | ^ numere.cpp:1:1: error: ‘x’ does not name a type 1 | x#include<iostream> | ^ numere.cpp: In function ‘int main()’: numere.cpp:10:5: error: ‘cin’ was not declared in this scope 10 | cin >> max1 >> max2 >> max3; | ^~~ numere.cpp:13:21: error: ‘swap’ was not declared in this scope 13 | if(max1 < max2) swap(max1, max2); | ^~~~ numere.cpp:14:21: error: ‘swap’ was not declared in this scope 14 | if(max1 < max3) swap(max1, max3); | ^~~~ numere.cpp:15:21: error: ‘swap’ was not declared in this scope 15 | if(max2 < max3) swap(max2, max3); | ^~~~ numere.cpp:36:5: error: ‘cout’ was not declared in this scope 36 | cout << s; | ^~~~
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ă.