12345678910111213141516171819202122232425 |
- import java.util.Scanner;
-
- /**
- * Created by iyasuwatts on 10/17/17.
- */
- public class SumofInput {
-
- public static void main(String[] args){
-
- }
-
- public void enterNumber() {
- Scanner input = new Scanner(System.in);
-
- System.out.println("Please enter a number");
- int n = input.nextInt();
-
- int prompt = 0;
- for(int i = 1; i <= n; i++) {
- prompt = i + prompt;
- }
- System.out.println("Your number is " + prompt + "!");
- }
- }
|