Thanks Greg :)
Will try that..by the way changing the order of print ( printing at the start of the loop helped too )
Type: Posts; User: shifu
Thanks Greg :)
Will try that..by the way changing the order of print ( printing at the start of the loop helped too )
public class squares {
public static void main(String[] args) {
int i =1, j=1;
System.out.println (i);
while (j < 40)
{
i=i+1;
j=i*i;
System.out.println(j);