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

If thier are 8 cups of ornge juice in order to make 18 cups of punc how many cups would be in 108 cups?
Which two crops became major trading goods for the Romans? A Wheat and Olives B Olives and Grapes C Grapes and Corn D Corn and Wheat
ASK A QUESTION There are 4 queens in a standard deck of 52 cards. You pick one card at random. What is the probability of not picking a queen?
The legislative branch of the u.s. government has two houses—the senate, in which every state has an equal number of representatives, and the house of represent
According to the appendix, totalitarian governments like to use abbreviations. Why is this the case?
find the unknown value 16 is 40% of ???
Kenneth drove 190.95 miles in hours. What was his average speed?
Who was the man who greatly improved the steam engine?
Please help! Which molecules are reactants in photosynthesis? WILL AWARD BRAINLIEST!
White reformers, such as those who created the indian rights association, advocated the