public class lotto { public void lottogenerator(int n) { if (n==5){ System.out.println("Az "+n+"-öslotto e heti nyer\u0151számai: "); for (int i=1;i<=5;i++){ System.out.print((Math.round(89*Math.random())+1)+", "); } } else if (n==6){ System.out.println("A "+n+"-oslottó e heti nyer\u0151számai: "); for (int i=1;i<=6;i++){ System.out.print((Math.round(44*Math.random())+1)+", "); } } else {System.out.println("Jelenleg csak 5-ös és 6-ös lottót ismerek...");} } public void prog(String[] args) { int tipus=Integer.parseInt(args[0]); lottogenerator(tipus); } public static void main(String[] args) { lotto e = new lotto(); e.prog(args); } }