clear //Given u=-25 //cm p=3.0 //Calculation f=100/p v=1/((1/f)+1/u) //Result printf("\n Distance is %0.0f m",v)