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

what is the weight in newtons of a person who weights 60kg
Addison paid $1.29 for gum and $0.89 for a package of notebook paper . She gave the cashier a $5 bill. If the tax was $0.14, how much change should Addison rece
Which of dictionary requires the most frequent updating? A. A Dictionary of Modern English Usage B. A Dictionary of American-English Usage C. American Dialec
What is the definition of a dynamic character?
how to write 15,409 in two forms
how do you write 6/10 as a terminating decimal?
Theodore Roosevelt supported powerful corporations that
what significant event occurred in 1054 in rome?
speed of sound.. If I am travelling at 1/2 the speed of sound, and there are sounds coming from behind me and in front of me. I understand they will sound at di
1. Being aware of natural forces will _____________.