Asked by Mike
public class Circumference {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
;
final double PI = 3.14159;
int radius = 10;
double area = PI * radius *radius;
double circum = 2 * PI * radius;
System.out.println("The area of a circle with radius " + radius + " is " + area);
System.out.println("The circum of a circle with radius " + radius + " is " + circum);
radius = 20;
area = PI * radius * radius;
circum = 2 * PI * radius;
System.out.println("The area of a circle with radius " + radius + " is " + area);
System.out.println("The circum of a circle with radius " + radius + " is " + circum);
I got this so far... I need to make a area2... then I have to divide area2/area1.... I then need a println statement for it.... Can anyone help? How do i make an area2, and what would the println statement for dividing the two be?
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
;
final double PI = 3.14159;
int radius = 10;
double area = PI * radius *radius;
double circum = 2 * PI * radius;
System.out.println("The area of a circle with radius " + radius + " is " + area);
System.out.println("The circum of a circle with radius " + radius + " is " + circum);
radius = 20;
area = PI * radius * radius;
circum = 2 * PI * radius;
System.out.println("The area of a circle with radius " + radius + " is " + area);
System.out.println("The circum of a circle with radius " + radius + " is " + circum);
I got this so far... I need to make a area2... then I have to divide area2/area1.... I then need a println statement for it.... Can anyone help? How do i make an area2, and what would the println statement for dividing the two be?
Answers
There are no AI answers yet. The ability to request AI answers is coming soon!
There are no human answers yet. A form for humans to post answers is coming very soon!