Skip to content

Instantly share code, notes, and snippets.

@kryvoboker
Created May 4, 2020 11:43
Show Gist options
  • Save kryvoboker/a0165ed51f38e1b80d765dd586d3b1e6 to your computer and use it in GitHub Desktop.
Save kryvoboker/a0165ed51f38e1b80d765dd586d3b1e6 to your computer and use it in GitHub Desktop.
HomeWork2
import java.util.Scanner;
/**
*
* @author kamaz
*/
public class Circle {
public void Circle() {
Scanner sc = new Scanner(System.in);
System.out.println("Press r and Enter");
double r = sc.nextDouble();
double length = 2*Math.PI*r;
System.out.println("Length of Circle: " + length);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment