#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 | #27452816 | Utilizator | |
Fișier | maxmin.cpp | Dimensiune | 251 B |
Data încărcării | 22 Ianuarie 2021, 12:07 | Scor / rezultat | Eroare de compilare |
maxmin.cpp:1:10: error: #include expects "FILENAME" or <FILENAME> #include <iostream> ^ maxmin.cpp: In function 'int main()': maxmin.cpp:6:1: error: 'cin' was not declared in this scope cin>>a>>b>>c; ^ maxmin.cpp:6:5: error: 'gt' was not declared in this scope cin>>a>>b>>c; ^ maxmin.cpp:6:31: warning: statement has no effect [-Wunused-value] cin>>a>>b>>c; ^ maxmin.cpp:8:9: error: expected ')' before ';' token if (b>Max) Max=b; ^ maxmin.cpp:8:13: error: expected ';' before ')' token if (b>Max) Max=b; ^ maxmin.cpp:8:20: warning: statement has no effect [-Wunused-value] if (b>Max) Max=b; ^ maxmin.cpp:9:9: error: expected ')' before ';' token if (c>Max) Max=c; ^ maxmin.cpp:9:13: error: expected ';' before ')' token if (c>Max) Max=c; ^ maxmin.cpp:9:20: warning: statement has no effect [-Wunused-value] if (c>Max) Max=c; ^ maxmin.cpp:10:7: error: 'lt' was not declared in this scope if (b<Min) Min=b; ^ maxmin.cpp:10:9: error: expected ')' before ';' token if (b<Min) Min=b; ^ maxmin.cpp:10:13: error: expected ';' before ')' token if (b<Min) Min=b; ^ maxmin.cpp:10:20: warning: statement has no effect [-Wunused-value] if (b<Min) Min=b; ^ maxmin.cpp:11:7: error: 'lt' was not declared in this scope if (c<Min) Min=c; ^ maxmin.cpp:11:9: error: expected ')' before ';' token if (c<Min) Min=c; ^ maxmin.cpp:11:13: error: expected ';' before ')' token if (c<Min) Min=c; ^ maxmin.cpp:11:20: warning: statement has no effect [-Wunused-value] if (c<Min) Min=c; ^ maxmin.cpp:12:1: error: 'cout' was not declared in this scope cout<<Max-Min; ^ maxmin.cpp:12:6: error: 'lt' was not declared in this scope cout<<Max-Min; ^ maxmin.cpp:12:16: warning: statement has no effect [-Wunused-value] 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ă.