#3973
Dându-se un număr real x
, să se scrie un program care calculează \(ln(x)\) cu 6
zecimale exacte.
Subiecte Atestat Informatica - Vâlcea
Problema | Logaritm | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.01 secunde | Limita memorie |
Total: 4 MB
/
Stivă 2 MB
|
Id soluție | #56481260 | Utilizator | |
Fișier | logaritm.cpp | Dimensiune | 1.08 KB |
Data încărcării | 21 Februarie 2025, 09:54 | Scor / rezultat | Eroare de compilare |
logaritm.cpp:4:38: error: expected identifier before '&' token void divizeaza(double st, double dr, &double mij) ^ logaritm.cpp:4:39: error: expected ',' or '...' before 'double' void divizeaza(double st, double dr, &double mij) ^ logaritm.cpp: In function 'void divizeaza(double, double, int&)': logaritm.cpp:6:5: error: 'mij' was not declared in this scope mij=(st+dr)/2; ^ logaritm.cpp: In function 'void dei(double, double, double, double&)': logaritm.cpp:21:29: error: invalid initialization of reference of type 'int&' from expression of type 'double' divizeaza(st,dr,mij); ^ logaritm.cpp:4:6: error: in passing argument 3 of 'void divizeaza(double, double, int&)' void divizeaza(double st, double dr, &double mij) ^ logaritm.cpp:30:17: error: expected ';' before 'combina' combina(val2, mij, rezultat); ^ logaritm.cpp: In function 'int main()': logaritm.cpp:50:29: error: 'factor' was not declared in this scope rezultat=floor(rezultat*factor)/factor; ^ logaritm.cpp:49:16: warning: unused variable 'fact' [-Wunused-variable] double fact=pow(10,6); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Logaritm 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ă.