Advertisement
AlsuSitdikova

задача 5 пункт 2

Dec 11th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. double med(int a,int b,int c){
  5. double m=sqrt(2*b*b+2*c*c-a*a);
  6. m=m/2;
  7. return m;
  8. }
  9. int main(){
  10. int a,b,c,temp;
  11. double a1,b1,c1;
  12. cin >>a>>b>>c;
  13. a1=med(a,b,c);
  14. cin>>b>>a>>c;
  15. b1=med(a,b,c);
  16. cin>>c>>b>>a;
  17. c1=med(a,b,c);
  18. cout<<a1<<" "<<b1<<" "<<c1;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement