1 2 3 4 5 6 7 8 9 10 11 12
clear //Given m=9*10**9 V=3.0*10**6 r=2 //Calculation q=(V*r)/m E=0.5*q*V //Result printf("\n The heat generated is %0.3f J", E)