fork download
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. #ifndef M_PI
  5. #define M_PI 3.14159265358979323846
  6. #endif
  7.  
  8. int main() {
  9. double s, v, h;
  10. std::cin >> s >> v >> h;
  11. double r = s * M_PI / 180.0;
  12. double hm = h + (v * v * pow(sin(r), 3)) / (3 * 8.9);
  13. printf("status 1, ketinggian %.1f\n", hm);
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5320KB
stdin
37 100 100
stdout
status 1, ketinggian 181.6