← Back
Code Challenge 1.11 - Circle Area Calculator
Objective
Create a console application that calculates the area of a circle based on user input for the radius.
Skills to Practice
- Prompting a user for input
- Converting input to the correct data type (if necessary)
- Performing arithmetic calculations
- Formatting output
Challenge Tasks
- Create a console project named Challenge 1-11.
- Prompt the user to enter the radius of the circle.
- Use the formula Area = π × radius2 to calculate the area of the circle.
- Optionally, round the answer to two decimal places.
- Display the calculated area to the user in a clear and formatted manner.
Sample Output
--- Circle Area Calculator ---
Enter the radius of the circle: 5
The area of the circle is 78.54