Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- #define pi acos(-1.0)
- using namespace std;
- int main()
- {
- float a, om, x, eps, y;
- cout << "Введите a: "; cin >> a;
- cout << "Введите Омега: "; cin >> om;
- cout << "Введите Эпсилон: "; cin >> eps;
- cout << "Введите x:"; cin >> x;
- if (2 - eps != 0 && sin(om*x) <=1 && sin(om*x)>=-1)
- {
- x = (pi / 2 - eps);
- y = a * exp(-a * om * x) * sin(om * x);
- cout << "y = " << y << endl;
- }
- else { cout << "2-eps=0"; }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment