summaryrefslogtreecommitdiff
path: root/3648/CH22/EX22.1/Ex22_1.sce
diff options
context:
space:
mode:
Diffstat (limited to '3648/CH22/EX22.1/Ex22_1.sce')
-rw-r--r--3648/CH22/EX22.1/Ex22_1.sce10
1 files changed, 10 insertions, 0 deletions
diff --git a/3648/CH22/EX22.1/Ex22_1.sce b/3648/CH22/EX22.1/Ex22_1.sce
new file mode 100644
index 000000000..819347a34
--- /dev/null
+++ b/3648/CH22/EX22.1/Ex22_1.sce
@@ -0,0 +1,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)