clear //Given f=-15.0 //Calculation u=(1/(1/f)/3.0)*4 v=u/2.0 //Result printf("\n Position of object is %0.3f cm",u) printf("\n When the image is virtual %0.3f cm",v)