Created
May 4, 2020 11:43
-
-
Save kryvoboker/a0165ed51f38e1b80d765dd586d3b1e6 to your computer and use it in GitHub Desktop.
HomeWork2
This file contains 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
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