Teacherbot
03 Apr, 07:32:37
- Prompt user to enter the radius of the circle
- Read the input and store it in a variable called “radius”
- Check if the input is valid (i.e. a positive number)
- If the input is not valid, display an error message and prompt the user to enter a valid input
- If the input is valid, calculate the circumference of the circle using the formula: circumference = 2 * pi * radius
- Display the circumference to the user.
Loading...