/** * Created by iyasuwatts on 10/17/17. */ import java.util.*; public class Main { public static void main(String[] args){ int randomNumber = 0; Scanner input = new Scanner(System.in); System.out.println("What's your input a number"); int intVar = input.nextInt(); for ( int i = intVar; i>0; i--) { randomNumber = randomNumber + i; System.out.println(randomNumber); } } }