Created
April 26, 2020 16:17
-
-
Save mariiaKolokolova/688aa77db5de7e090175b95dfdf86021 to your computer and use it in GitHub Desktop.
Lesson1_Circumference_of_circle
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
package maricka.kolokolova; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
// TODO Auto-generated method stub | |
Scanner sc = new Scanner(System.in); | |
double r; | |
System.out.println("Input r:"); | |
r = sc.nextDouble(); | |
double res = 2 * Math.PI * r; | |
System.out.println("Circumference of a circle = " + res); | |
sc.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment