2022-12-30 14:55:33 +01:00
|
|
|
import java.util.Scanner;
|
|
|
|
|
2022-12-30 15:26:35 +01:00
|
|
|
/**
|
|
|
|
* Classe di test per PrimeGenerator
|
|
|
|
* @author radaelli11353
|
|
|
|
*/
|
2022-12-30 14:55:33 +01:00
|
|
|
public class Test {
|
2022-12-30 15:26:35 +01:00
|
|
|
public static void main(String[] args) {
|
|
|
|
Scanner in = new Scanner(System.in);
|
|
|
|
System.out.print("Inserisci un numero: ");
|
|
|
|
int max = in.nextInt();
|
|
|
|
PrimeGenerator primi = new PrimeGenerator(max);
|
2022-12-30 14:55:33 +01:00
|
|
|
|
2022-12-30 15:26:35 +01:00
|
|
|
while(primi.hasNext()) {
|
|
|
|
System.out.println(primi.next());
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2022-12-30 14:55:33 +01:00
|
|
|
}
|