View Single Post
  #2 (permalink)  
Old 06-15-2007, 05:21 AM
mysstere
Posts: n/a
{ This program calculates the area
of a circle given its radius.}
program area_of_a_circle;
uses crt;
var radius, area:real;
var yes_no: char;
begin
repeat
textcolor(10);
textbackground(1);
clrscr;
gotoxy(10,2);
writeln('This program calculates the area oa circle given the radius');
gotoxy(10,4);
Write('Enter the radius: ');
readln(radius);
area:=pi*radius*radius;
gotoxy(10,6);
writeln('The radius is: ',area:0:2,' units square.');
gotoxy(10,8);
write('Do you want to find another area(y/n)? ');
readln(yes_no);
until yes_no = 'n';
textcolor(7);
writeln;
writeln('Press any key to continue...');
readln;

end.

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!