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
10 changes: 10 additions & 0 deletions src/main/java/Main.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
import com.sun.tools.doclets.formats.html.SourceToHTMLConverter;

import java.util.Scanner;

/**
* Created by iyasuwatts on 10/17/17.
*/
public class Main {

public static void main(String[] args){

Scanner firstNumber = new Scanner(System.in);
System.out.println("Enter Number:");
int n = Integer.parseInt(firstNumber.nextLine());
Copy link
Contributor

Choose a reason for hiding this comment

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

no, rework this to sum from 0 to n, and print the sum. you need loop of some kind.

System.out.println(n+1);


}
}