Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Grupo 2.3
- public class Main4 {
- public static void main(String[] args) {
- Integer number;
- FactorizationList factorizationList;
- String[] options = {
- "Ingresar número",
- "Generar número aleatorio"
- };
- Menu menu = new Menu(options);
- Integer option = 0;
- do {
- option = menu.getOption();
- switch(option) {
- case 1:
- number = Helper.getPositiveInt("Ingrese un número positivo: ");
- factorizationList = new FactorizationList(number);
- factorizationList.printResult();
- break;
- case 2:
- number = Helper.randomInt(1, 1000);
- factorizationList = new FactorizationList(number);
- factorizationList.printResult();
- break;
- }
- Helper.pressEnterKeyToContinue();
- }while(option != 0);
- System.out.println("Fin del programa");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement