(* circle.pas - This program will find the area of the circle whose * radius is supplied by the user. * Later on, we could modify the program by having it also compute * the circumference. * By default, Pascal will print real numbers in scientific notation. * When using a real variable in a write/writeln statement, if you * say value:x:y, the value is printed in a space of x characters with * y digits of precision. If x is not wide enough, then Pascal will override. * This may cause any text appearing later on the line to appear farther to * the right than you originally planned. * If you only supply one number after the colon, as in value:x, then * you are not supplying the precision, only the amount of space to print. *) program circle; const pi = 3.1415926535; var radius, area : real; begin write('What is the radius of the circle? '); readln(radius); area := pi * radius * radius; writeln('The area of the circle is ', area:5:2); end.