1 2 3 4 5 6 7 8 9 10 11
clear //Given C=100*10**-6 //F V=500 //V //Calculation q=V/2.0 E=0.5*(0.5*C*V**2) //Result printf("\n Charge in the new stored energy is %0.3f J", E)