1 2 3 4 5 6 7 8 9 10 11 12
clear //Given R=20 //cm //Calculation f=R/2.0 u=-f v=-u/2.0 //Result printf("\n Position of the object is %0.3f cm",u) printf("\n Position of the image is %0.3f cm",v)