Friday, October 7, 2016

Square Root in Turbo Pascal

This simple program that I wrote using Turbo Pascal For Windows will accept integer number value from the user and then our program will convert the given number by the user to it's square root equivalent.

Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My mobile number here in the Philippines is 09173084360.





Sample Program Output


Program Listing

Program Square_Root;
Uses WinCrt;


Var   value_a : real;
      solve_sqrt : reAL;

Begin
  Clrscr;
  Write('Square Root Solver in Turbo Pascal');
  writeln;
  Writeln;
  Write('Give a Number : ');
  Readln(value_a);
  Writeln;
   solve_sqrt := sqrt(value_a);
  Write('The Square Root equivalent of ' ,round(value_a),
         ' is ' , round(solve_sqrt), '.');
  writeln;
  Writeln;
  write('End of Program');
  Writeln; Writeln; Writeln;
  Write('      Written By: Mr. Jake R. Pomperada,MAED-IT     ');
  Writeln;
  Readln;
End.



No comments:

Post a Comment