How do you scan 3 variable in one line its like i have 3 int variable named ( x , y and z) I want to input the three of them in a single line
i can input like this 7 21 35 < single line
int x = 7;
int y = 21;
int z = 35;
x = sc.nextInt();
y = sc.nextInt();
z = sc.nextInt();
System.out.printf("%2d, %2d, %2d\n", x, y, z);
I have found something in C++ their code is like this ( scanf ("%lf %lf %lf", &x, &y, &z); )