int N = 0;
int somma = 0;
public void aggiungi(int numero) {
if (isPrimo(numero)) {
N++;
somma += numero;
}
if (N < 10)
aggiungi(numero + 1);
}
:tongue: