{"slug":"triangle-area-sas","tier":1,"subject":"geometry","title":"Tri Area SAS","description":"Triangle area from two sides and included angle.","files":[{"filename":"TRIAREA.py","content":"import math\ndef p(s):print(s)\ndef o1():\n p(\"=AREA SAS=\")\n a=float(input(\"a:\"))\n b=float(input(\"b:\"))\n c=float(input(\"C:\"))\n r=c*math.pi/180\n ar=0.5*a*b*math.sin(r)\n p(\"A=\"+str(ar))\ndef menu():\n while True:\n  p(\"=TRI AREA=\")\n  p(\"1:AREA SAS\")\n  p(\"0:EXIT\")\n  c=input(\"?>\")\n  if c==\"1\":o1()\n  elif c==\"0\":break\nmenu()"}],"testCases":[{"id":"eq-5-5-60","inputs":["1","5","5","60","0"],"expectedContains":["A=10.8"]},{"id":"right-3-4-90","inputs":["1","3","4","90","0"],"expectedContains":["A=6"]}],"usage":"Triangle area using the **SAS** formula `A = ½·a·b·sin(C)`, where `C` is the angle *between* sides `a` and `b`.\n\nLaunch `TRIAREA` from `prgm`, choose `1:AREA SAS`, then:\n\n1. `a:` — length of the first side.\n2. `b:` — length of the second side.\n3. `C:` — the angle between them, **in degrees** (the program converts to radians internally).\n\nOutput is `A=`. Press `0` at the main menu to exit.","example":{"problem":"A triangle has sides 5 and 5 with a 60° angle between them. What's its area?","walkthrough":"1. Run `TRIAREA`, choose `1:AREA SAS`.\n2. `a:` → **5**, `b:` → **5**, `C:` → **60**.\n3. Output: `A=10.825...`.\n\nArea ≈ 10.83 sq units. Verify: ½ · 5 · 5 · sin(60°) = 12.5 · 0.866 ≈ 10.825. ✓"}}