Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Program(double x, double y, double b)
- {
- double min, max, result;
- if (x*y < 2)
- {
- min = x;
- if (y < min)
- {
- min = y;
- }
- result = min;
- }
- else if (x*y > 5)
- {
- max = b*x;
- min = x;
- if (Math::Cos(x) > max)
- {
- max = Math::Cos(x);
- }
- if (Math::Sin(y) > max)
- {
- max = Math::Sin(y);
- }
- if (min > x)
- {
- min = x;
- }
- result = max / min;
- }
- else
- {
- result = b + y * Math::Sin(y);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement