class Pro6_2_2
{
public static void main
(String[] args
) {
for(int i=1; i<=100; i++)
{
if(isPrime(i) == true)
}
}
public static boolean isPrime(int num)
{
if (num==1) return false;
for(int i=2; i<num; i++)
{
if(num%i == 0)
return false;
}
return true;
}
}
Y2xhc3MgUHJvNl8yXzIgCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluKFN0cmluZ1tdIGFyZ3MpCgl7CgkJZm9yKGludCBpPTE7IGk8PTEwMDsgaSsrKQoJCXsKCQkJaWYoaXNQcmltZShpKSA9PSB0cnVlKQoJCQkJU3lzdGVtLm91dC5wcmludChpKyIgIik7CgkJfQoJfQoKCXB1YmxpYyBzdGF0aWMgYm9vbGVhbiBpc1ByaW1lKGludCBudW0pCgl7CgkJaWYgKG51bT09MSkgcmV0dXJuIGZhbHNlOwoJCWZvcihpbnQgaT0yOyBpPG51bTsgaSsrKQoJCXsKCQkJaWYobnVtJWkgPT0gMCkKCQkJCXJldHVybiBmYWxzZTsKCQl9CgkJcmV0dXJuIHRydWU7CgoJfQoKfQo=