elocgamer507 elocgamer507
  • 13-09-2022
  • Computers and Technology
contestada

print 3 numbers before asking a user to input an integer

print 3 numbers before asking a user to input an integer class=

Respuesta :

ishwarya ishwarya
  • 13-09-2022

Answer:

you can use an array to do this

Explanation:

(I've written this in java - I think it should work out):

Scanner input = new Scanner(System.in);

System.out.println("Enter an integer: ");

int userInt = input.nextInt();

int[] array = new int[userInt - 1];

for(int i = userInt-1; i < userInt; i--)

     System.out.println(array[i]);

Answer Link

Otras preguntas

Identify the category of obstacle that best describes each example,
Which is a correct model for the equation 6 + 2x = 3(x + 1)?
Andy was given data to draw 3 scatter diagrams. He also decided to draw a line of best fit on each one. 50 50 40 1004 90 80 70 60 40 х x 30 30 X X 5 8 8 8 8 8 8
Which is the least likely way to become infected with hiv brainly
How many moles of helium gas are contained in a 7 L flask at STP
Find the area of the figure. (Sides meet at right angles.) 6 m bm 3 m 2 m 3 m
for what novel did toni morrison win a pulitzer prize in 1988?
Which of the following passages from Lincoln's Gettysburg Address appeals to the audience's emotions? A. "The world...will never forget what they did here." B.
What is the role of science and technology for the betterment of human living?
Help me pls, ASAP ​ุุุุุุุุุุุุ