Advertisement
WupEly

Untitled

Jan 27th, 2022
784
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. #include<iostream>
  2. #include<cmath>
  3.  
  4.  
  5. using namespace std;
  6.  
  7. double maxn(double a, double b, double c) {
  8.     if (a > b && a > c) {
  9.         return(a);
  10.     }
  11.     if (b > a && b > c) {
  12.         return(b);
  13.     }
  14.  
  15.     return(c);
  16. }
  17. double minn(double a, double b, double c) {
  18.     if (a < b && a < c) {
  19.         return(a);
  20.     }
  21.     if (b < a && b < c) {
  22.         return(b);
  23.     }
  24.  
  25.     return(c);
  26.  
  27. }
  28.  
  29. double calculating(double a, double x) {
  30.     if (a > x) {
  31.         return(minn(pow(cos(a * x), 2), pow(sin(x), 3), a - x));
  32.     }
  33.     if (a == x) {
  34.         return(exp(a + x));
  35.     }
  36.  
  37.     return(maxn(log10(abs(a + x)), sqrt(abs(x)), 1));
  38. }
  39. void setax(double& a, double& x) {
  40.     cin >> a;
  41.     cin >> x;
  42. }
  43. void getc(double c) {
  44.     cout << c << endl;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement