			import java.util.Scanner;
				
				
					public class CircleStuff {
						public static void main(String[] args){
							Scanner myScanner = new Scanner(System.in);
							//Creates some variables
							double pi = 3.14159265359;
							double sum = 0;
							boolean done = false;
							
							//while loop to keep asking for new input
							while (done == false){
							
							//Asks for input about what you want to do and stores it.
							System.out.println("Do you want to know the circumference or area of the circle?");
							String answer = myScanner.nextLine();
							answer = answer.toLowerCase();
						   
							//Compares the answer to the input of the user and calculates the proper formula corresponding with the input
							if (answer.equals("circumference")){
						    	System.out.println("What is the radius of the circle?");
								double radius = myScanner.nextDouble();
								String test = myScanner.nextLine();
						    	sum = radius * pi;
								System.out.println("The circumference of the circle is: " + sum);
							}else if (answer.equals("area") ){
								System.out.println("What is the radius of the circle?");
								double radius = myScanner.nextDouble();
								String test = myScanner.nextLine();
								sum = radius * radius * pi;
								System.out.println("The area of the circle is: " + sum);
							}else{
								System.out.println("I didn't understand \"" + answer + "\", please try again." );
							}
							
							//Asks the user if they want to do another calculation and stores the input
							System.out.println("Do you want to try again?");
							String answer2 = myScanner.nextLine();
							answer2 = answer2.toLowerCase();
							
							//Compares the answer of the input and either continues the loop or breaks it.
							if (answer2.equals("yes")){
								done = false;
							}else if (answer2.equals("no")){
								done = true;
							}else{
								System.out.println("I didn't understand \"" + answer2 + "\", please try again." );
								answer2 = myScanner.nextLine();
								answer2 = answer2.toLowerCase();
							}
							}
						}
					
					}