0
In java, how to get input from user?
During your math class, you are given a task to calculate the perimeter of a circle. You decide to write a small program that will take the radius as input, and will calculate and print the perimeter for you. The value for Ï (pi) is already defined. Sample Input 4 Sample Output 25.12
3 Answers
+ 1
Scanner myScanner = new Scanner(System.in);
System.out.println(2*3.14*myScanner.nextInt());