summaryrefslogtreecommitdiff
path: root/1553/CH25/EX25.9/25Ex9.sce
diff options
context:
space:
mode:
Diffstat (limited to '1553/CH25/EX25.9/25Ex9.sce')
-rw-r--r--1553/CH25/EX25.9/25Ex9.sce11
1 files changed, 11 insertions, 0 deletions
diff --git a/1553/CH25/EX25.9/25Ex9.sce b/1553/CH25/EX25.9/25Ex9.sce
new file mode 100644
index 000000000..8b6383c82
--- /dev/null
+++ b/1553/CH25/EX25.9/25Ex9.sce
@@ -0,0 +1,11 @@
+//chapter 25 EX 9
+clc;
+clear;
+close;
+l=6; b=12; h=15;
+volume=l*b*h;
+
+side_largest=gcd(int32([l b h])); //side of largest cube
+vol_largestcube=side_largest^3;
+num_of_cubes=volume/vol_largestcube;
+printf("The least possible cubes are %d",(volume/vol_largestcube));