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

-5y + 8 = -3y + 10 Having a bit of trouble with this equation.
Geometry math question no Guessing and Please show work
Simplify this equation
PLEASE HELP!!! ASAP!!!
More points!! Please answer all questions
Brian's scores on his first four spanish test are 92, 85, 90, and 92. What test score must Brian earn on the fifth test so that the mean will be exactly 90?
a tentative explanation to a question about the natural world is a lawhypothesistheory fact
using your knowledge of cross products how would you solve for x in the following pair of equivalent fraction 7 over x equals 2/4
identify the unit rate in the graph im sorry I accidentally put history but its mathematics
find the length of this line segment (in inches)