      program trojkat
c
c Program oblicza warto"sci katow w trojkacie, je"reli dane s"a d"lugo"sci
c jego bok"ow.
c
      implicit none
      double precision a,b,c,alfa,beta,gamma,pi,rad
      pi=4.0d0*datan(1.0d0)
      rad=180.0d0/pi
      print *,"Podaj dlugosci bokow a, b i c"
      read (*,*) a,b,c
      alfa=rad*dacos(0.5d0*(a*a+c*c-b*b)/(a*c))
      beta =rad*dacos(0.5d0*(a*a+b*b-c*c)/(a*b))
      gamma=rad*dacos(0.5d0*(b*b+c*c-a*a)/(b*c))
      print *,"alfa=",alfa," beta=",beta," gamma=",gamma
      stop
      end
