summaryrefslogtreecommitdiff
path: root/3648/CH22/EX22.1/Ex22_1.sce
blob: 819347a3400f810056d41940d50d816965afaa42 (plain)
1
2
3
4
5
6
7
8
9
10
//Example 22_1
clc();
clear;
//To find the position and size of the image
d1=5    //units in cm
d2=30     //units in cm
i=(d1*d2)/(d2-d1)   //Units in cm
d3=2           //units in cm
I=(i/d2)*d3      //units in cm
printf("The position of the image is i=%d cm\nThe Size of the image is I=%.2f cm High",i,I)