clear //Initialization C1=10*10**-6 //capacitance in Farad V=100 //voltage //Calculation E=(0.5)*(C1*V**2) //Energy stored //Results printf("\n E = %.1f mJ",E*10**3)