CONST Pi = 3.14159265358, Rad = 180 / Pi
OPEN "Triangle.txt" FOR OUTPUT AS #1
FOR i = 1 TO 5
PRINT "Treugolnik №"; i
INPUT "Vvedite Ugol:", ug
INPUT "Vvedite storonu a:", a
INPUT "Vvedite storonu b:", b
PRINT #1, a; b; ug
NEXT
CLOSE #1
OPEN "Triangle.txt" FOR INPUT AS #1
FOR i = 1 TO 5
INPUT #1, a, b, ug
' По теореме косинусов
c = SQR(b * b + a * a - 2 * a * b * COS(ug / Rad))
PRINT "Treugolnik №"; i
PRINT "Ugol ="; ug
PRINT "a ="; a
PRINT "b ="; b
COLOR 15: PRINT "c ="; c: COLOR 7
NEXT
CLOSE #1
Тестирование выполнено в программе QB64 ( Скачать )