connnnor3108 connnnor3108
  • 24-01-2020
  • Computers and Technology
contestada

Write a statement that outputs variable userNum. End with a newline.

Respuesta :

ijeggs
ijeggs ijeggs
  • 25-01-2020

Answer:

System.out.println(userNum);

Explanation:

Using Java programming language, lets assume the variable userNum is entered by a user. The code snippet below will prompt the user to enter a number and output the the variable:

import java.util.Scanner;

public class TestClass {

   public static void main(String[] args) {

   System.out.println("Enter a number");

   Scanner input = new Scanner(System.in);

   int userNum = input.nextInt();

       System.out.println(userNum);

   }

}

Answer Link

Otras preguntas

Her sketches are unusual because of their unusual perspective, radical use of color, and she uses unexpected subjects. what is the error in this sentence
Please answer this correctly
Math question please help if you get this right I will mark you as a brainliest
which number is rational [tex] \sqrt{5} [/tex] 0.77... [tex] \pi [/tex] o.36458121
the sum of twice a number and half the number is 10?
The diagonals if a rectangle are equal 1 always 2 Sometimes 3 never
8 to the negative 2nd power =
X f(x) −1 −6 0 −3 1 0 g(x) g(x) = 4x − 5 part a.write a sentence to compare the slope of the two functions and show the steps you used to determine the slope of
Math question please help If you get this right I will mark you as a brainliest
what number multiplied 37 and 18 as a result in the same