public static void main(String[] args) {
for (int i = 2; i <= 100; i++) {
int temp = (int) Math.sqrt(i);
if (i <= 3) {
System.out.println(i + " is a prime");
} else {
for (int j = 2; j <= temp; j++) {
if (i % j == 0) {
break;
}
if (j >= temp) {
System.out.println(i + " is a prime");
}
}
}
}
}