Advertisement
kirya_shkolnik

Какой-то чел - 4

Jan 18th, 2021
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. double func(double x) {
  7. return (exp(2x) - pow(x,3) );
  8. }
  9. void RegCikl(double a, double b, double h) {
  10. double x, y;
  11. for (x = a; x <= b; x += h) {
  12. y = func(x);
  13. cout << x << y << endl;
  14. }
  15. }
  16.  
  17.  
  18.  
  19. int main()
  20. {
  21. double a,b,h;
  22. cin >> a >> b >> h;
  23. RegCikl(a,b,h);
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement