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

can someone help me with this! Its NOT C!! tyyyy!
PLSSS HELP!! I'LL GIVE BRAINLIEST IF RIGHT Which is the equation of a parabola with a directrix at y = 2 and a focus at (5, 0). A) y = one fourth(x − 5)2 + 1 B)
A 235 kg object and a 1.37×1012 kg are located 2.59×104 m away from each other. What is the force due to gravity between the two objects?
The vertices of quadrilateral MNPQ are M(−3,−2),N(−1,4),P(2,4), and Q(4,−2). Translate quadrilateral MNPQ using the vector ⟨3,−4⟩.
what is the function of RNA
Which type of volcano has steep angled sides, throws blobs of lava in the air that fall as cinders, and is built over a short period of time? Cinder cone Compo
Write the quantum numbers of the last electron of Neptunium.​
Please I need help!!!!
Can Somebody Please Help Me With Homework ​
4(x+4) + 2x = 52 need answer