Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
public class SportsWorld {
public static void main(String[] args) {
double radius = 0.0;
double circumference = 0.0;
double area = 0.0;
char taskToDo = ' ';
char more = 'Y';
more = Console.readChar("Want to process a pool? (Y or N):");
while (more == 'Y') {
System.out.println();
radius = Console.readDouble("Enter the value of radius:");
System.out.println("Enter your choice of task: ");
taskToDo = Console.readChar("C to circumference; A to compute area ");
System.out.println();
if (taskToDo == 'C') {
circumference = doCircumference(radius);
System.out.print("The circumference for a pool of radius " + radius + " is " + circumference);
} else {
area = doArea(radius);
System.out.print("The area for a pool of radius " + radius + " is " + area);
}
System.out.println();
more = Console.readChar("Want to process another trip? (Y or N):");
}
42