1 2 3 4 5 6 7 8 9 10 11 12
clear //Given m=9*10**9 q=1.6*10**-19 r=10**-10 //Calculation U=m*q**2/r K=U/2.0 //Result printf("\n Kinetic energy is %0.3f J",K)