Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main()
- {
- double a, b, c, d, t1, t2, tau, mas[1000][2];
- int i = 1;
- cin >> a >> b >> c >> d >> t1 >> t2 >> tau;
- mas[0][0] = t1;
- mas[0][1] = a * exp(b * t1) + c * sin(d * t1);
- while (t1 + i*tau <= t2)
- {
- mas[i][0] = mas[i - 1][0] + tau;
- mas[i][1] = a * exp(b * mas[i][0]) + c * sin(d * mas[i][0]);
- i++;
- }
- for (int j = 0; j < i; j++)
- {
- printf("%.4lf", mas[j][0]);
- cout << " ";
- printf("%.4lf", mas[j][1]);
- cout << endl;
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment