Skip to content

Instantly share code, notes, and snippets.

@mariiaKolokolova
Created April 26, 2020 16:17
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 mariiaKolokolova/688aa77db5de7e090175b95dfdf86021 to your computer and use it in GitHub Desktop.
Save mariiaKolokolova/688aa77db5de7e090175b95dfdf86021 to your computer and use it in GitHub Desktop.
Lesson1_Circumference_of_circle
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