frustration

найти ариф.геометр.гармонич.квадратическое

Feb 15th, 2019
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include <conio.h>
  4.  
  5. using namespace std;
  6.  
  7. int main(){
  8.     float ar, geo, garm, kvad, x, y, z;
  9.     cin >> x >> y >> z;
  10.     ar = (x + y + z) / 3;
  11.     geo = pow(x*y*z, 1. / 3);
  12.     garm = 3 / (1 / x + 1 / y + 1 / z);
  13.     kvad = sqrt((x*x + y*y + z*z) / 3);
  14.  
  15.     cout << ar << " " << geo << " " << garm << " " << kvad << "\n";
  16.  
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment