1 2 3 4 5 6 7 8 9 10
clear //Given u=-25.0 //cm v=-50.0 //cm //Calculation f=1/((1/v)-1/u) //Result printf("\n Focal length is %0.3f cm", f)