#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 | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #16329703 | Utilizator | |
Fișier | maxmin.cpp | Dimensiune | 496 B |
Data încărcării | 12 Iulie 2019, 15:39 | Scor / rezultat | 60 puncte |
maxmin.cpp: In function 'int main()': maxmin.cpp:9:5: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if (a < b) ^ maxmin.cpp:13:5: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if (b < a) ^ maxmin.cpp:17:5: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if (min == c) ^ maxmin.cpp:21:5: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if (min == b) ^ maxmin.cpp:25:5: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if (min == a) ^ maxmin.cpp:29:16: warning: 'max' may be used uninitialized in this function [-Wmaybe-uninitialized] cout << max - min; ^ maxmin.cpp:17:2: warning: 'min' may be used uninitialized in this function [-Wmaybe-uninitialized] if (min == c) ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 10 | 10 | Exemplu | |
2 | 0 secunde | OK. | 10 | 10 | ||
3 | 0 secunde | OK. | 10 | 10 | ||
4 | 0 secunde | OK. | 10 | 10 | ||
5 | 0 secunde | OK. | 10 | 10 | ||
6 | 0 secunde | OK. | 10 | 10 | ||
7 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
8 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
9 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
10 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
Punctaj total | 60 |
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ă.