Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis0
primitive operator question 4 is not properly explained would like some help
1 Resposta
+ 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());
}
}