1234567891011121314151617 |
- /**
- * Created by iyasuwatts on 10/17/17.
- */
- import java.util.*;
-
- public class Main {
- public static void main(String[] args){
- int total = 0;
- Scanner scanner = new Scanner(System.in);
- System.out.println("What number");
- int n = scanner.nextInt();
- for(int i = n; i > 0; i--){
- total = i + total;
- System.out.println(total);
- }
- }
- }
|