Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. void Program(double x, double y, double b)
  2.         {
  3.             double min, max, result;
  4.             if (x*y < 2)
  5.             {
  6.                 min = x;
  7.                 if (y < min)
  8.                 {
  9.                     min = y;
  10.                 }
  11.                 result = min;
  12.             }
  13.             else if (x*y > 5)
  14.             {
  15.                 max = b*x;
  16.                 min = x;
  17.                 if (Math::Cos(x) > max)
  18.                 {
  19.                     max = Math::Cos(x);
  20.                 }
  21.                 if (Math::Sin(y) > max)
  22.                 {
  23.                     max = Math::Sin(y);
  24.                 }
  25.                 if (min > x)
  26.                 {
  27.                     min = x;
  28.                 }
  29.                 result = max / min;
  30.             }
  31.             else
  32.             {
  33.                 result = b + y * Math::Sin(y);
  34.             }
  35.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement