#3973
Logaritm
C++
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 | #57972575 | Utilizator | |
Fișier | logaritm.cpp | Dimensiune | 424 B |
Data încărcării | 06 Mai 2025, 09:53 | Scor / rezultat | Eroare de compilare |
logaritm.cpp: In function 'void logaritm_natural(long double, long double, long double, long double&)': logaritm.cpp:7:20: error: 'e' was not declared in this scope if(abs(pow(e, mid) - x) <= abs(pow(e, exponent) - x)) ^ logaritm.cpp:7:26: error: 'pow' was not declared in this scope if(abs(pow(e, mid) - x) <= abs(pow(e, exponent) - x)) ^ logaritm.cpp:7:31: error: 'abs' was not declared in this scope if(abs(pow(e, mid) - x) <= abs(pow(e, exponent) - x)) ^ logaritm.cpp:10:16: error: 'e' was not declared in this scope if(pow(e, mid) <= x) ^ logaritm.cpp:10:22: error: 'pow' was not declared in this scope if(pow(e, mid) <= x) ^ logaritm.cpp:11:39: error: 'eroare' was not declared in this scope logaritm_natural(x, mid + eroare, dr, exponent); ^ logaritm.cpp:12:44: error: 'eroare' was not declared in this scope else logaritm_natural(x, st, mid - eroare, exponent); ^
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ă.