This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class hahahaha { | |
public static void main(String[] args) { | |
double diameter = 5; //set diameter to change end values// | |
double radius = diameter/2; | |
double circumference = diameter * Math.PI; | |
double area = (diameter/2)*(diameter/2) * 3.14159; | |
System.out.println ("diameter=" + diameter); | |
System.out.println ("radius=" + radius); | |
System.out.println ("circumference=" + circumference); | |
System.out.println ("area=" + area); |