divider

Objective

Create a console application that calculates the area of a circle based on user input for the radius.

Skills to Practice

  • icon Prompting a user for input
  • icon Converting input to the correct data type (if necessary)
  • icon Performing arithmetic calculations
  • icon Formatting output
divider

Tasks

  • icon Create a new project named 1-8-area-circle-calculator
  • icon Complete the following tasks:
    • icon Prompt the user to enter the radius of the circle.
    • icon Use the formula Area = π × radius2 to calculate the area of the circle.
    • icon Optionally, round the answer to two decimal places.
    • icon Display the calculated area to the user in a clear and formatted manner.
divider

Sample Output

Sample Output
--- Circle Area Calculator ---
Enter the radius of the circle: 5 [Enter]
The area of the circle is 78.54

Begin Challenge