User:Beeebeees/Sandbox

Source Code
public class Power { public static void main(String args[]) {    int i,j,f; for(i=1;i<=150;i++) {        f=1; for(j=2;j<=i/2;j++) {           if(i%j==0) {              f=0; if(isPrime(j)==1) {                 if(i%(j*j)!=0) {                      f=1; break; }               }              }          }          if(f==0) System.out.print(i+" "); }  }

public static int isPrime(int n)    { int i;      for(i=2;i<=n/2;i++) {         if(n%i==0) return 0; }      return 1; } }