Sunday, July 16, 2017

Write a program that displays the numbers between 1 and 10 in reverse order(descending order).

/**
 * Created by Jo on 7/10/2017.
 * For more exercises and lessons, visit http://shegertech.blogspot.com/
 * Chapter 5, Exercise 2
 */

import java.util.Scanner;

public class Q2Solution {
    public static void main(String[] args) {
        for (int i=10; i>0;i--){
            System.out.println(i);
        }
    }
}

Share: