#9
Să se scrie un program care citeşte de la tastatură trei numere naturale și determină diferenţa dintre cel mai mare şi cel mai mic.
Problema | maxmin | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58428847 | Utilizator | |
Fișier | maxmin.cpp | Dimensiune | 290 B |
Data încărcării | 03 Iunie 2025, 18:56 | Scor / rezultat | Eroare de compilare |
maxmin.cpp: In function 'int main()': maxmin.cpp:8:12: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator>' if(b > max) ^ maxmin.cpp:9:13: error: overloaded function with no contextual type information max = b; ^ maxmin.cpp:10:12: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator>' if(c > max) ^ maxmin.cpp:11:13: error: overloaded function with no contextual type information max = c; ^ maxmin.cpp:12:12: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<' if(b < min) ^ maxmin.cpp:13:13: error: overloaded function with no contextual type information min = b; ^ maxmin.cpp:14:12: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<' if(c < min) ^ maxmin.cpp:15:13: error: overloaded function with no contextual type information min = c; ^ maxmin.cpp:16:19: error: invalid operands of types '<unresolved overloaded function type>' and '<unresolved overloaded function type>' to binary 'operator-' cout << max - min; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema maxmin 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ă.