summaryrefslogtreecommitdiff
path: root/3769/CH3/EX3.14
diff options
context:
space:
mode:
authorprashantsinalkar2018-02-03 10:59:42 +0530
committerprashantsinalkar2018-02-03 10:59:42 +0530
commitd1e070fe2d77c8e7f6ba4b0c57b1b42e26349059 (patch)
tree612077a22c8142c0ae754ec11882a4e7d5dc25a4 /3769/CH3/EX3.14
parentf35ea80659b6a49d1bb2ce1d7d002583f3f40947 (diff)
downloadScilab-TBC-Uploads-d1e070fe2d77c8e7f6ba4b0c57b1b42e26349059.tar.gz
Scilab-TBC-Uploads-d1e070fe2d77c8e7f6ba4b0c57b1b42e26349059.tar.bz2
Scilab-TBC-Uploads-d1e070fe2d77c8e7f6ba4b0c57b1b42e26349059.zip
Modified the code
Diffstat (limited to '3769/CH3/EX3.14')
-rw-r--r--3769/CH3/EX3.14/Ex3_14.sce13
1 files changed, 7 insertions, 6 deletions
diff --git a/3769/CH3/EX3.14/Ex3_14.sce b/3769/CH3/EX3.14/Ex3_14.sce
index 2e6b8247d..a17fcfde3 100644
--- a/3769/CH3/EX3.14/Ex3_14.sce
+++ b/3769/CH3/EX3.14/Ex3_14.sce
@@ -1,12 +1,13 @@
+
clear
//Given
-m=9*10**9
-q=1.6*10**-19
-r=10**-10
+m=9*10**9// constant
+q=1.6*10**-19// charge C
+r=10**-10// distance m
//Calculation
-U=m*q**2/r
-K=U/2.0
+U=m*q**2/r// potential energy
+K=U/2.0// Kinetic energy
//Result
-printf("\n Kinetic energy is %0.3f J",K)
+printf("\n Kinetic energy is %e J",K)