The sum of integers from a to b

Report a typo

Print the sum of all integers from a to b including both.

It is guaranteed that a < b in all test cases.

Sample Input 1:

7
15

Sample Output 1:

99
Write a program in Java 25
import java.util.Scanner;

class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// start coding here
}
}

Create a free account to access the full topic