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

figure0123456vehicles4122028364452linear ?pattern ?constant?
Find a quadratic equation in standard form given its roots are 2+/- i square root of 3/2
Stuck on the last part. Says "The equation of the asymptotic for [tex]g(x) = {2}^{x - 5} [/tex]is ?
what is 9+10????????????????????????????????????????????
The sum of two consecutive integers is 97. What is the smaller integer?
Suppose y varies directly when x when x is 14 y is 7 write the equation that relates x and y
11 more than nine times the amount of 10
If f(x)=x², which of the following describes the graph of f(x - 1)?OA.The graph of fx-1) is a vertical shift of f(x)=x2² one unit down.OB. The graph of fx-1) is
wer each part. If necessary, round your answers to a) Josh runs 8 miles in 62 minutes. How many miles does he run per minute? miles per minute b) Yolanda bought
−3x−6+(−1) i need help with this ine