Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Math1
//clang 6.0.0 #include <cmath> #include <iostream> #include <iomanip> int main() { const float PI = 3.141'592'653'589'793'238; const float v = 20; const float h = 10; const float g = 9.806'651; const float theta = 45 * PI / 180; std::cout << std::setprecision(17) << std::sqrt(std::pow(20, 2) + std::pow(std::sin(theta), 2) + 2 * g * h) << '\n'; }
run
|
edit
|
history
|
help
0
ljblblljkl
projecte1
Te
Check if a year is leap year or not
Unlike C (even C99/C11), C++ allows initializers in if-conditions, so this compiles.
Sum of Natural Numbers using loop
mpi_distributed_sort
MiniumNumberDivideConquer
illegal instruction (SIGILL)
Initialise arrays with N number