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;
  12. double g = 10;
  13. double hm = h + (v*v*pow(sin(r),1)) / (9*g);
  14. printf("status 1 dan ketinggian %.2f\n", hm);
  15. }
  16.  
Success #stdin #stdout 0s 5320KB
stdin
37 100 100
stdout
status 1 dan ketinggian 166.87