Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <vector>
- #include <iostream>
- #include <cmath>
- #include <iomanip>
- using namespace std;
- double b, N;
- double fun(const double &x)
- {
- return (b * x * x) / (N + x);
- }
- int main()
- {
- freopen("input.txt", "r", stdin);
- freopen("output.txt", "w", stdout);
- cout << fixed << setprecision(8);
- cin >> b >> N;
- double Max = 100;
- double h = 0.1;
- vector <double> x;
- x.push_back(0);
- for (double i = h; i <= Max; i += h)
- x.push_back(x[x.size() - 1] + h * fun(i - h));
- auto it = x.begin();
- for (double i = h; i <= Max; i += h, it++)
- cout << "(" << i << "; " << *it << ")" << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement