Page 4 - java programs
P. 4

public class JavaProgram


            {

                public static void main(String args[])

                {

                    int n=1, i, j;


                    for(i=0; i<10; i++)

                    {

                        for(j=0; j<10; j++)

                        {

                            System.out.print(n+ "  ");


                            n++;

                        }

                        System.out.println();

                    }

                }

            }



            When the above Java program is compile and executed, it will produce the following
            output:
   1   2   3   4   5   6