clear //Given r=0.02 //m u=4*3.14*10**-7 //T/A m I=12 //A //Calculation B=u*I/(4*r) //Result printf("\n The magnitude of magnetic field is %0.2f *10**-4 T",B*10**4)