summaryrefslogtreecommitdiff
path: root/3782/CH3/EX3.17/Ex3_17.sce
blob: 971780ccd6a08f00c360c020d8b79801dbf742c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42


//
//given

FB_AB=45+(30/60)
FB_BC=60+(0/60)
FB_CD=10+(30/60)
FB_DA=75+(45/60)


BB_AB=45+(30/60)
BB_BC=60+(0/60)
BB_CD=10+(30/60)
BB_DA=75+(45/60)


interiorA=180-(FB_AB+BB_DA)
interiorB=(FB_BC+BB_AB)
interiorC=180-(BB_BC+FB_CD)
interiorD=(FB_DA+BB_CD)

//convert into mins and degrees
deg1=int(interiorA)
mins1=int((interiorA-deg1)*60)
deg2=int(interiorB)
mins2=int((interiorB-deg2)*60)
deg3=int(interiorC)
mins3=int((interiorC-deg3)*60)
deg4=int(interiorD)
mins4=int((interiorD-deg4)*60)

//calculations
n=4
check=(2*n-4)*90
summ=interiorA+interiorB+interiorC+interiorD

printf("\n Interior angle A %0.3f degrees %0.3f minutes",deg1,mins1)
printf("\n Interior angle B %0.3f degrees %0.3f minutes",deg2,mins2)
printf("\n Interior angle C %0.3f degrees %0.3f minutes",deg3,mins3)
printf("\n Interior angle D %0.3f degrees %0.3f minutes",deg4,mins4)
printf("\n %0.3f degrees %0.3f degrees ",check,summ)