| { 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. |