Hi guys just started out, this is my code so far:
Scanner scan = new Scanner(System.in);
System.out.println("This is a program used to find the circumference "
+ "and diameter of a circle.");
System.out.println("Enter the radius of your circle:");
double r =scan.nextDouble();
double d = r*2;
double c = d*3.1415;
double f = r*r;
double a = 3.1415*f;
System.out.println("The Circumference of your circle is: "+c+" and the "
+ "diamterer of your circle is: "+d+".");
System.out.println("Would you like to know the area of your circle?");
What i plan to add to my code is to give the user the choice of wether they want to know the area of the circle or wether they dont (by making them answer either yes or no) any ideas on how to do this? and feedback would really help, Thanks.