Java Write Loop Reads Ten Numbers Second Loop Displays Opposite Order Entered Q37175688

in java Write a loop that reads ten numbers and a second loopthat displays them in the opposite order from which they wereentered.


Answer


import java.util.Scanner;public class ReversePrint { public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.print(“Enter 10 numbers: “); int[] arr = new int[10]; for (int i = 0; i < arr.length; i++) {

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.