clear //Given L=500*10**-3 I1=20*10**-3 //A I2=10*10**-3 //A //Calculation U1=0.5*L*I1**2 U2=0.5*L*I2**2 //Result printf("\n Magnetic energy stored in the coil is %0.3f *10**-4 J",U1*10**6) printf("\n New value of energy is %0.3f J",U2)