#9
maxmin
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 | #41272596 | Utilizator | |
Fișier | maxmin.cpp | Dimensiune | 307 B |
Data încărcării | 17 Ianuarie 2023, 21:12 | Scor / rezultat | Eroare de compilare |
maxmin.cpp: In function 'int main()': maxmin.cpp:3:5: error: 'cin' was not declared in this scope cin>>a>>b>>c; ^ maxmin.cpp:4:9: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if(a<b<c) ^ maxmin.cpp:5:9: error: 'cout' was not declared in this scope cout<<a+c; ^ maxmin.cpp:6:15: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] else if (a<c<b) ^ maxmin.cpp:7:9: error: 'cout' was not declared in this scope cout<<a+b; ^ maxmin.cpp:8:15: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] else if (b<a<c) ^ maxmin.cpp:9:9: error: 'cout' was not declared in this scope cout<<b+c; ^ maxmin.cpp:10:15: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] else if (b<c<a) ^ maxmin.cpp:11:9: error: 'cout' was not declared in this scope cout<<b+a; ^ maxmin.cpp:12:15: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] else if (c<b<a) ^ maxmin.cpp:13:9: error: 'cout' was not declared in this scope cout<<c+a; ^ maxmin.cpp:14:15: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] else if (c<a<b) ^ maxmin.cpp:15:9: error: 'cout' was not declared in this scope cout<<c+b; ^
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ă.