12345678910111213141516171819202122232425 |
- /**
- * Created by iyasuwatts on 10/17/17.
- */
-
- import java.util.Scanner;
-
- public class Main {
- public static void main(){}
- public static void SumOfInput()
- {
- System.out.println("Please enter a number");
-
- Scanner scanner = new Scanner(System.in);
- int number = scanner.nextInt();
- int answer = 0;
-
- for(int i = 1; i <= number; i ++)
- {
- answer += i;
- }
-
- System.out.println(answer);
- }
- }
|