Hello ive been working on this real number program for a couple of days and i still cant get it working it always prints out the same two numbers 1 2 1 2. Please help.
public class perfectnums
{
public static void main(String[] args)
{
int n = 1;
int a;
int t = 2;
int c = 2^(t-1)*(2^t-1);
while ( n < 5 )
{
t++;
c = 2^(t-1)*(2^t-1);
n++;
a = c;
if (a < 0);
{
System.out.println(a);
}
}
}
}