fork(1) download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main() {
  6. double S, V;
  7. cin >> S >> V;
  8.  
  9. double g = 10.0;
  10. double rad = S * M_PI / 180.0; // konversi derajat ke radian
  11. double range = (V * V * sin(2 * rad)) / g;
  12.  
  13. cout << range << endl;
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0.01s 5304KB
stdin
Standard input is empty
stdout
0