Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <math.h>
- using namespace std;
- #define p 9.8
- #define g 3.14159265
- int main(int argc, _TCHAR* argv[])
- {
- double L;
- char v[255];
- char a[255];
- printf("Vvedit' znachen'a nyl'ovoy shvudkosty (v metrah na sekundu) ta kut (v graducah):\n ");
- cout << "v = ";
- cin >> v;
- if (v < 0)
- printf("Shvudkist' menshe nyla");
- else
- {
- cout << "a = ";
- cin>>a;
- }
- L = (atof(v)*atof(v)*sin(atof(a) * p / 180)) / g;
- printf("Dovguna poloty:%f \n", L);
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement