clear //Given C=50*10**-6 //F V=230 //V //Calculation // q=C*V*sqrt(2) E=0.5*C*(V*sqrt(2))**2 //Result printf("\n (i) Maximum charge on the capacitor is %0.2f *10**-3 C",q*10**3) printf("\n (ii) The maximum energy stored in the capacitor is %0.2f J",E)