#333
Să se scrie un program care citeşte trei numere reale şi verifică dacă aceste numere pot fi lungimile laturilor unui triunghi și în caz afirmativ determină daca triunghiul este ascuțitunghic, dreptunghic sau obtuzunghic.
| Problema | triunghi1 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64448604 | Utilizator | |
| Fișier | triunghi1.cpp | Dimensiune | 1.20 KB |
| Data încărcării | 07 Mai 2026, 13:23 | Scor/rezultat | Eroare de compilare |
triunghi1.cpp:4:1: error: two or more data types in declaration of ‘a’ 4 | int float a,b,c,maxi; | ^~~ triunghi1.cpp:4:1: error: two or more data types in declaration of ‘b’ triunghi1.cpp:4:1: error: two or more data types in declaration of ‘c’ triunghi1.cpp:4:1: error: two or more data types in declaration of ‘maxi’ triunghi1.cpp: In function ‘int main()’: triunghi1.cpp:7:10: error: ‘a’ was not declared in this scope 7 | cin>>a>>b>>c; | ^ triunghi1.cpp:7:13: error: ‘b’ was not declared in this scope 7 | cin>>a>>b>>c; | ^ triunghi1.cpp:7:16: error: ‘c’ was not declared in this scope 7 | cin>>a>>b>>c; | ^ triunghi1.cpp:12:13: error: ‘maxi’ was not declared in this scope 12 | maxi=c; | ^~~~ triunghi1.cpp:18:13: error: ‘maxi’ was not declared in this scope 18 | maxi=a; | ^~~~ triunghi1.cpp:24:13: error: ‘maxi’ was not declared in this scope 24 | maxi=b; | ^~~~ triunghi1.cpp:28:12: error: ‘maxi’ was not declared in this scope 28 | if(maxi==c) | ^~~~ triunghi1.cpp:35:12: error: ‘maxi’ was not declared in this scope 35 | if(maxi==a) | ^~~~ triunghi1.cpp:42:12: error: ‘maxi’ was not declared in this scope 42 | if(maxi==b) | ^~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema triunghi1 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ă.