Skip to content

Instantly share code, notes, and snippets.

@hespelere
Created March 28, 2025 15:22
Show Gist options
  • Save hespelere/ae5e2eeb7bf81144252c226b8c2a04a8 to your computer and use it in GitHub Desktop.
Save hespelere/ae5e2eeb7bf81144252c226b8c2a04a8 to your computer and use it in GitHub Desktop.
Icantcode
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);
}
}
@InfinityDevTech
Copy link

Nerd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment