blob: bb16cbea1316085fe1e8458d43714dc5199cb05c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
clear
//
//
//
//Variable declaration
m1=15
n=5
m2=25
D15=0.62 //diameter of 15th ring(cm)
D5=0.3 //diameter of 5th ring(cm)
//Calculation
x=D15**2-D5**2
y=m1-n
z=m2-n
r=4*z/(4*y)
D25=sqrt((r*x)+(D5**2)) //diameter of 25th ring(cm)
//Result
printf("\n diameter of 25th ring is %0.3f cm",D25)
|