Generate random numbers

Report a typo

You are given three numbers: n , a and b.

Your task is to output the sum of the first n random numbers in a range from a to b inclusively. The seed of the generator should be set as a + b.

The input contains numbers in a single line in the following order: n, a, b.

Sample Input 1:

100 5 10

Sample Output 1:

734
Write a program in Java 17
import java.util.*;

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

Create a free account to access the full topic