Showing posts with label square a number in turbo pascal. Show all posts
Showing posts with label square a number in turbo pascal. Show all posts

Friday, April 14, 2017

Square a Number in Turbo Pascal

Here is a sample program that will ask the user to give a number and then the program will convert the given number into it's square number equivalent using Pascal as our programming language. The code is very short and easy to understand. Thank you.

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_Solver;

Uses WinCrt;

Var a : integer;

Begin

  Clrscr;
  Write('Square Value Converter in Pascal');
  Writeln;
  Writeln;
  Write('Give a Number : ');
  Readln(a);
  Writeln;
  Write('The square value of ' ,a, ' is ' , sqr(a),'.');
  Writeln;
  Writeln;
  Write('End of Program');
  Readln;
End.