#1333
trapez
Cunoscând laturile unui trapez isoscel, să se calculeze lungimea diagonalei.
Problema | trapez | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54987621 | Utilizator | |
Fișier | trapez.cpp | Dimensiune | 301 B |
Data încărcării | 15 Decembrie 2024, 11:29 | Scor / rezultat | Eroare de compilare |
trapez.cpp: In function 'int main()': trapez.cpp:10:32: error: expected '}' before ')' token double linieMij{(B + b) / 2)}; ^ trapez.cpp:10:32: error: expected ',' or ';' before ')' token trapez.cpp:10:12: warning: unused variable 'linieMij' [-Wunused-variable] double linieMij{(B + b) / 2)}; ^ trapez.cpp: At global scope: trapez.cpp:11:20: error: 'linieMij' was not declared in this scope double result{(linieMij * sqrt(l * l - (B * B - 2 * B * b + b * b))}; ^ trapez.cpp:11:36: error: 'l' was not declared in this scope double result{(linieMij * sqrt(l * l - (B * B - 2 * B * b + b * b))}; ^ trapez.cpp:11:40: error: 'l' was not declared in this scope double result{(linieMij * sqrt(l * l - (B * B - 2 * B * b + b * b))}; ^ trapez.cpp:11:45: error: 'B' was not declared in this scope double result{(linieMij * sqrt(l * l - (B * B - 2 * B * b + b * b))}; ^ trapez.cpp:11:49: error: 'B' was not declared in this scope double result{(linieMij * sqrt(l * l - (B * B - 2 * B * b + b * b))}; ^ trapez.cpp:11:57: error: 'B' was not declared in this scope double result{(linieMij * sqrt(l * l - (B * B - 2 * B * b + b * b))}; ^ trapez.cpp:11:61: error: 'b' was not declared in this scope double result{(linieMij * sqrt(l * l - (B * B - 2 * B * b + b * b))}; ^ trapez.cpp:11:65: error: 'b' was not declared in this scope double result{(linieMij * sqrt(l * l - (B * B - 2 * B * b + b * b))}; ^ trapez.cpp:11:69: error: 'b' was not declared in this scope double result{(linieMij * sqrt(l * l - (B * B - 2 * B * b + b * b))}; ^ trapez.cpp:11:72: error: expected ')' before '}' token double result{(linieMij * sqrt(l * l - (B * B - 2 * B * b + b * b))}; ^ trapez.cpp:12:5: error: 'cout' does not name a type cout << result; ^ trapez.cpp:13:5: error: expected unqualified-id before 'return' return 0; ^ trapez.cpp:14:1: error: expected declaration before '}' token } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema trapez 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ă.