import math
a = float (raw_input())
b = float (raw_input())
c = float (raw_input())
tt = (a**2+b**2-c**2)/(2*a*b)
print '%.1f' % (180/math.pi * math.acos(tt))
對於三角形,三邊長分別為a, b, c,給定a和b之間的夾角C,則有:。編寫程序,使得輸入三角形的邊a, b, c,可求得夾角C(角度值)。
import math
a = float (raw_input())
b = float (raw_input())
c = float (raw_input())
tt = (a**2+b**2-c**2)/(2*a*b)
print '%.1f' % (180/math.pi * math.acos(tt))
對於三角形,三邊長分別為a, b, c,給定a和b之間的夾角C,則有:。編寫程序,使得輸入三角形的邊a, b, c,可求得夾角C(角度值)。
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。