#1301
Se citesc trei numere reale de la tastatură. Să se verifice dacă formează laturile unui triunghi isoscel.
| Problema | isoscel | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64503998 | Utilizator | |
| Fișier | isoscel.cpp | Dimensiune | 301 B |
| Data încărcării | 11 Mai 2026, 16:19 | Scor/rezultat | 30 puncte |
isoscel.cpp: In function ‘int main()’: isoscel.cpp:7:10: warning: right operand of comma operator has no effect [-Wunused-value] 7 | cin>>a,b,c; | ^ isoscel.cpp:7:11: warning: right operand of comma operator has no effect [-Wunused-value] 7 | cin>>a,b,c; | ^ isoscel.cpp:8:17: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] 8 | if(a==b && a==c && b==c || a!=b && b!=c ) | ~~~~~~~~~~~~~^~~~~~~ isoscel.cpp:8:1: warning: ‘b’ is used uninitialized [-Wuninitialized] 8 | if(a==b && a==c && b==c || a!=b && b!=c ) | ^~ isoscel.cpp:6:12: note: ‘b’ was declared here 6 | { int a,b,c,d; | ^ isoscel.cpp:8:9: warning: ‘c’ may be used uninitialized [-Wmaybe-uninitialized] 8 | if(a==b && a==c && b==c || a!=b && b!=c ) | ~~~~~^~~~~~~ isoscel.cpp:6:14: note: ‘c’ was declared here 6 | { int a,b,c,d; | ^ isoscel.cpp:10:31: warning: ‘d’ may be used uninitialized [-Wmaybe-uninitialized] 10 | else if(a+b<=c or a+c<=b or c+d<=a) | ~^~ isoscel.cpp:6:16: note: ‘d’ was declared here 6 | { int a,b,c,d; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 10 | 0 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 4 | 0.001 secunde | OK. | 10 | 10 | ||
| 5 | 0.001 secunde | OK. | 10 | 10 | ||
| 6 | 0.002 secunde | OK. | 10 | 10 | ||
| 7 | 0.002 secunde | Raspuns gresit. | 20 | 0 | ||
| 8 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 30 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema isoscel 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ă.