0
primitive operator question 4 is not properly explained would like some help
2 Answers
+ 5
The value of 2Ï is equal to 6.283.
And they are telling us to multiply 2Ï Ă radius and we are taking radius as the input.
So, if the radius is 4 =, so the calculation is 2Ï Ă 4 = 25.12.
The code is:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
double pi = 3.14;
//your code goes here
System.out.println((pi * 2) * scanner.nextInt());
}
}