summaryrefslogtreecommitdiff
path: root/1004/CH1/EX1.5/Ch01Ex5.sci
blob: 1bbe8a0090a02b97586e2d99c5755152c85ed48d (plain)
1
2
3
4
5
6
7
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