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

When this 3-digit number is rounded to the nearest hundred, it rounds to 200.  Rounded to the nearest ten, this number rounds to 200.  The sum of the digits of
is 4.110 greater than or less than 4.10
What is five times the product of x and y increased by 3xy
Explain why 58 can be rounded to the nearest hundred even though there is not a digit in the hundreds place?
Please help. What is the value of the expression when a = 3 and b = 2?     3a^3 + 2b^3A.78   B.97C.135  D.745
When you divide a whole number by a whole number( other then one), the quotient is a smaller number?
What did African Americans gain during WWII?
simplify the expression w+14w-6w & 3a²+6a+2b²
How many tens, hundreds, thousandten thousands are listed in the numbers below.1.  500.   2. 1,100.  3. 3,000.  4. 25,000.  5. 60,000.   6. 110,000.  7. 250,000
A rectangular field has an area of 2100 square feet. The length of the field is 50 feet. How wide is the field