1 2 3 4 5 6 7 8 9 10 11 12
clear //Given u=-9.0 //cm y=1 y1=1.5 R=-15.0 //cm //Calculation v=1/(((y-y1)/R)-(y1/-u)) //Result printf("\n The value of distance is %0.3f cm",v)