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

The depreciation method that bases the expense on the level of use instead of the passage of time is the _______ method. A. units-of-production B. straig
Convert 79.5 mi/h to m/s. 1 mi = 1609 m. Answer in units of m/s.
What kind of warfare characterized World War 1
What would happen to the size of the carnivore population if the herbivore population increased?
what did the scientists who founded the royal scientists society of london share with lavoisier
The write-off of intangible assets is called A. depreciation. B. depletion. C. amortization. D. deterioration.
Reduce 7y + 2y 2 - 7 by 3 - 4y.
What is the range of values for the measurements 200 +/- 3%
A water holding tank measures 105 m long, 40m wide, and 11m deep. Traces of mercury have been found in the tank, with a concentration of 60mg/l. What is the tot
PLZ HELP ASAP WILL GIVE LOTS OF POINTS!.