![]() |
|
|
|
| ||||||
|
Welcome to the The ProgrammersTalk Community forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| Tags: |
![]() |
![]() | | LinkBack | Thread Tools | Display Modes | ![]() |
| |
| |||
| { 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. |
![]() |
| Thread Tools | |
| Display Modes | |
| |