Buckets:
| import java.util.Random; | |
| import java.util.Scanner; | |
| public class Main { | |
| public static void main(String[] args) { | |
| Scanner scanner = new Scanner(System.in); | |
| Random random = new Random(); | |
| while (true) { | |
| System.out.println("\nEnter your choice:"); | |
| System.out.println("1 - Generate PIN"); | |
| System.out.println("2 - Exit"); | |
| System.out.print("Your choice: "); | |
| String choice = scanner.nextLine(); | |
| if (choice.equals("1")) { | |
| int pin = 1000 + random.nextInt(9000); | |
| System.out.println("Generated PIN: " + pin); | |
| } | |
| else if (choice.equals("2")) { | |
| System.out.println("Exit..."); | |
| break; | |
| } | |
| else { | |
| System.out.println("Неверный выбор. Пожалуйста, введите 1 или 2."); | |
| } | |
| } | |
| scanner.close(); | |
| } | |
| } |
Xet Storage Details
- Size:
- 968 Bytes
- Xet hash:
- 05561232deecdd049db3b7b0405fc89cf8891a6572cc41c1fa3bcdfa4ef692e8
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.