Commit 0f6c5c28 authored by daniel.tang's avatar daniel.tang

Upload New File

parent 1c6af3bc
package programmingP2week1;
public class circleOfLife {
public static void main(String[] args) {
// TODO Auto-generated method stub
circleOfLife1 areaC = new circleOfLife1();
areaC.radiusA = 10;
areaC.pis = 3.14;
areaC.c = Math.pow(areaC.radiusA, 2) * areaC.pis;
areaC.diams = areaC.radiusA *2;
System.out.println("Area of 10 is " + areaC.c);
circleOfLife1 circuC = new circleOfLife1();
areaC.radiusA = 10;
areaC.pis = 3.14;
areaC.diams = areaC.radiusA *2;
areaC.c = areaC.radiusA * areaC.pis;
System.out.println("Circumference of 10 is " +areaC.c);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment