Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Lesson3 {
- public static void main(String[] args) {
- System.out.println("Input min number");
- Scanner scan = new Scanner(System.in);
- int x = scan.nextInt();
- System.out.println("Min number is: " + x);
- System.out.println("Input max number : ");
- int y = scan.nextInt();
- System.out.println("Max number is : " + y);
- int random = (int) Math.random() * y + x;
- System.out.println("Your random number is: " + random);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement