Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _USE_MATH_DEFINES
- #include <iostream>
- #include <conio.h>
- #include <string>
- #include <set>
- #include <map>
- #include <algorithm>
- #include <string>
- #include <math.h>
- #include <vector>
- #include <cmath>
- #include <sstream>
- using namespace std;
- int main()
- {
- double V, a, k, proms, S=0;
- cin >> V >> a >> k;
- proms = ((V*V)*sin(2 * ((a*3.1415926535) / 180))) / 10.0;
- S = proms;
- cout.setf(ios::fixed);
- cout.precision(2);
- while (proms > 0.0000000001)
- {
- proms /=k;
- if (proms > 0.0000000001)
- {
- S += proms;
- }
- }
- cout << S;
- _getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment