blob: bd0c37ffdbc513044e9dcc8586dfb3929acc7b9a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
clear
//Given
u=-25.0 //cm
v=-90.0 //cm
//calculation
f=1/((1/v)-1/u)
f1=(1/2.0)*10**2
u=1/((1/v)-1/f1)
//Result
printf("\n (i) focal length is %0.1f cm",f)
printf("\n (ii) Distance is %0.1f cm",u)
|