1 2 3 4 5 6 7 8 9 10 11
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)