Advertisement
kirya_shkolnik

Макс -4

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