diff options
Diffstat (limited to '3689/CH12/EX12.12')
-rw-r--r-- | 3689/CH12/EX12.12/12_12.sce | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/3689/CH12/EX12.12/12_12.sce b/3689/CH12/EX12.12/12_12.sce new file mode 100644 index 000000000..85cade508 --- /dev/null +++ b/3689/CH12/EX12.12/12_12.sce @@ -0,0 +1,20 @@ +////
+//Variable Declaration
+//r = Symbol('r') //Radius of inner circle
+C = list(5,2,0)
+//Calculations
+A1 = %pi
+A2 = %pi*(2)**2 - A1
+A3 = %pi*(3)**2 - (A1 + A2)
+At = A1 + A2 + A3
+f1 = A1/At
+f2 = A2/At
+f3 = A3/At
+sf = f1 + f2 + f3
+
+ns = (f1*C(1)+f2*C(2)+f3*C(3))/sf
+
+//Results
+printf("\n A1, A2, A3:%f*r**2 %f*r**2 %f*r**2 ', A1, A2, A3)
+printf("\n f1, f2, f3: %f %f %f', f1,f2,f3)
+printf("\n Average payout $ %f ',((ns)))
|