Advertisement
kirya_shkolnik

Макс - 5

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