Skip to content

Instantly share code, notes, and snippets.

@thmain
Created June 3, 2018 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thmain/cbba01e6882111514068e685fef661f1 to your computer and use it in GitHub Desktop.
Save thmain/cbba01e6882111514068e685fef661f1 to your computer and use it in GitHub Desktop.
public class CircumferenceOfCircle {
public static void circumference(double radius){
double pi = 3.14;
double circumference = 2*pi*radius;
System.out.println("Area of circumference with radius="+radius + " is: " + circumference);
}
public static void main(String[] args) {
double radius = 4;
circumference(radius);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment