clear // i=20 im=i/(1.414) //that is i*root 2 //the heat produced by i is the sum of heat produced by dc and ac current p=i**2 q=im**2 r=p+q I=(r**0.5) printf("\n I= %0.1f A",I)