Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Program exerxise_square_root;
var guess:real;
count,num:integer;
begin
writeln('input a num');
readln(num);
writeln('what is your guess?');
readln(guess);
count:=0;
while count<>5 do
begin
guess:=(num / guess )+guess;
guess:= guess / 2;
writeln(guess:0:10);
count:=count+1;
end;
writeln('sqrt of ',num,'is',guess:0:10);
end.
Advertisements
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.
AcceptLearn more