Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/main/java/Main.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
import java.util.Scanner;
/**
* Created by iyasuwatts on 10/17/17.
*/
public class Main {

public static void main(String[] args){
Scanner in = new Scanner(System.in);

System.out.print("Insert Number here");

int test = in.nextInt();

int result = 0;


for (int i=0;i <=test; i++){
result +=i;
System.out.println(result);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rework to only print the completed sum of 0 to n.

}






}
}