mirror of
https://github.com/System-End/APCSA.git
synced 2026-04-19 19:55:17 +00:00
18 lines
537 B
Java
Executable file
18 lines
537 B
Java
Executable file
/* Lesson 8 Coding Activity Question 1 */
|
|
|
|
import java.util.Scanner;
|
|
import testing.Math;
|
|
|
|
public class U2_L8_Activity_One {
|
|
|
|
public static void main(String[] args) {
|
|
Scanner scan = new Scanner(System.in);
|
|
System.out.println("Enter a positive integer:");
|
|
int rn = scan.nextInt();
|
|
System.out.println((int) (Math.random() * (rn + 1)) + 2);
|
|
System.out.println((int) (Math.random() * (rn + 1)) + 2);
|
|
System.out.println((int) (Math.random() * (rn + 1)) + 2);
|
|
|
|
scan.close();
|
|
}
|
|
}
|