Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- double med(int a,int b,int c){
- double m=sqrt(2*b*b+2*c*c-a*a);
- m=m/2;
- return m;
- }
- int main(){
- int a,b,c,temp;
- double a1,b1,c1;
- cin >>a>>b>>c;
- a1=med(a,b,c);
- cin>>b>>a>>c;
- b1=med(a,b,c);
- cin>>c>>b>>a;
- c1=med(a,b,c);
- cout<<a1<<" "<<b1<<" "<<c1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement