#3458
sin_cos
Se dă un număr natural x
, reprezentând mărimea în grade sexagesimale a unui unghi. Să se afișeze sin(x)
și cos(x)
.
Problema | sin_cos | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #55019613 | Utilizator | |
Fișier | sin_cos.cpp | Dimensiune | 269 B |
Data încărcării | 16 Decembrie 2024, 20:40 | Scor / rezultat | Eroare de compilare |
sin_cos.cpp: In function 'int main()': sin_cos.cpp:8:5: error: 'cin' was not declared in this scope cin >> x; ^ sin_cos.cpp:8:5: note: suggested alternative: In file included from sin_cos.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ sin_cos.cpp:10:5: error: 'cout' was not declared in this scope cout << fixed << setprecision(3) << sin((x * pi) / 180) << " " << fixed << setprecison(3) << cos((x * pi) / 180); ^ sin_cos.cpp:10:5: note: suggested alternative: In file included from sin_cos.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ sin_cos.cpp:10:13: error: 'fixed' was not declared in this scope cout << fixed << setprecision(3) << sin((x * pi) / 180) << " " << fixed << setprecison(3) << cos((x * pi) / 180); ^ sin_cos.cpp:10:13: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:42:0, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from sin_cos.cpp:1: /usr/include/c++/4.8/bits/ios_base.h:964:3: note: 'std::fixed' fixed(ios_base& __base) ^ sin_cos.cpp:10:36: error: 'setprecision' was not declared in this scope cout << fixed << setprecision(3) << sin((x * pi) / 180) << " " << fixed << setprecison(3) << cos((x * pi) / 180); ^ sin_cos.cpp:10:36: note: suggested alternative: In file included from sin_cos.cpp:3:0: /usr/include/c++/4.8/iomanip:192:3: note: 'std::setprecision' setprecision(int __n) ^ sin_cos.cpp:10:93: error: 'setprecison' was not declared in this scope cout << fixed << setprecision(3) << sin((x * pi) / 180) << " " << fixed << setprecison(3) << cos((x * pi) / 180); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema sin_cos 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ă.