Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Q1.底辺と高さをキー入力させ、三角形の面積結果を表示させよ。
- x = input(print("Please fill in the base value of the triangle.\n-->"))
- print ("The base = " + str(x) + "[cm]")
- h = input(print("Please fill in the height value of the triangle.\n-->"))
- print ("The height = " + str(h) + "[cm]\n")
- a = int(x) * int(h) / 2
- print ("The area of a triangle = " + str(a) + "[cm2]")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement