summaryrefslogtreecommitdiff
path: root/1004/CH1/EX1.5/Ch01Ex5.sci
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1004/CH1/EX1.5/Ch01Ex5.sci
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '1004/CH1/EX1.5/Ch01Ex5.sci')
-rwxr-xr-x1004/CH1/EX1.5/Ch01Ex5.sci8
1 files changed, 8 insertions, 0 deletions
diff --git a/1004/CH1/EX1.5/Ch01Ex5.sci b/1004/CH1/EX1.5/Ch01Ex5.sci
new file mode 100755
index 000000000..1bbe8a009
--- /dev/null
+++ b/1004/CH1/EX1.5/Ch01Ex5.sci
@@ -0,0 +1,8 @@
+// Scilab Code Ex1.5 Mass-Energy Equivalence: Pg: 22 (2008)
+U = 7.5e+011; // Total electrical energy generated in a country, kWh
+kWh = 1000*3600; // Conversion factor for kilowatt-hour into joule, J/kWh
+c = 3e+08; // Speed of light, m/s
+m = (U*kWh)/c^2; // Mass equivalent of energy, kg
+printf("\nThe mass converted into energy = %2d kg", m);
+// Result
+// The mass converted into energy = 30 kg \ No newline at end of file