JAVA
java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
RANDOM CHALLENGE
Create a function which takes a limit as an argument
and returns the random value between this two limits..
create this function without using default random library..
for example :
input :
random(2,10);
random(2,10);
random(2,10);
random(2,10);
output :
7
5
3
9
#Happy_Coding...
*/
import java.util.Scanner;
public class Random
{
static long previousSeed = 1;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Enter the lower limit: ");
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run