Explanation : Given program fragment in Pseudo language is
x = m ;
y = 1 ;
while (x – y > e)
x = (x + y) /2 ;
y = m/x ;
}
Print (x)
This program will find out the square root of m,
suppose that m = 2
X-
Y
X
Y
1st looping
2
3/2=1.5
2/1.5=1.33
2nd looping
.16
(1.5+1.3)/2 = 1.415
2.0/1.415 = 1.413
3rd looping
0.02
1.414
1.414
4th looping
0
as x – y = 0 exit from loop hence print 1.414 which is root of 2.