Search:

Type: Posts; User: shifu

Search: Search took 0.10 seconds.

  1. Re: My first code for computing a table of squares - and its not working :(

    Thanks Greg :)
    Will try that..by the way changing the order of print ( printing at the start of the loop helped too )
  2. My first code for computing a table of squares - and its not working :(

    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);
Results 1 to 2 of 2