import prog.io.*;
import java.util.Random;
import prog.utili.Intero;
class Lotto {
public static void main(String[] args) {
ConsoleInputManager tastiera = new ConsoleInputManager();
ConsoleOutputManager video = new ConsoleOutputManager();
int limite = tastiera.readInt("Numeri da 1 a ");
int quanti = tastiera.readInt("Quanti numeri da generare: ");
int cifra;
int somma = 0;
Random numero = new Random();
for (int i = 1; i <= quanti; i = i + 1){
cifra = (numero.nextInt(limite) + 1);
video.println("Numero: " + cifra);
somma = (somma + cifra);
}
Intero lettere = new Intero(somma);
video.println("La somma dei numeri e' :" + somma + " (" + lettere.toString() + ")");
}
}