summaryrefslogtreecommitdiff
path: root/2024/CH2/EX2.1/2_1.sce
diff options
context:
space:
mode:
Diffstat (limited to '2024/CH2/EX2.1/2_1.sce')
-rwxr-xr-x2024/CH2/EX2.1/2_1.sce11
1 files changed, 11 insertions, 0 deletions
diff --git a/2024/CH2/EX2.1/2_1.sce b/2024/CH2/EX2.1/2_1.sce
new file mode 100755
index 000000000..ac0896cc5
--- /dev/null
+++ b/2024/CH2/EX2.1/2_1.sce
@@ -0,0 +1,11 @@
+clc
+//Initialization of variables
+m=32.1739 //lbm
+z=100 //ft
+g=32.1739
+//calculations
+PE=m*z
+PE2=m*z/g
+//results
+printf("Potential energy = %.2f g/g0 ft lbf",PE)
+printf("\n in other units, Potential energy = %d g ft slug",PE2)