/* Another java example program that

         1. simply defines a public class "AnotherProg"

            to contain the "public static void main(String args[])"

         2. and read an input integer and print all integers

            between the input and 1 before printing a welcome message.

      */

            import javax.swing.JOptionPane;     // for an input dialog box

            public class AnotherProg

            {

              public static void main (String args[])

              { String inputt;      //for the input string

                inputt = JOptionPane.showInputDialog (

                        "Enter an Integer < 50");

                int num = Integer.parseInt(inputt); 

                        // convert to an int type

                for (int k=num; k>=1; k--)

                  { System.out.print ("THE VALUE OF k IS:: ");

                    System.out.println(k);

                  }     // end of loop body

                System.out.println ("Welcome To the Another Java Program!");

                System.exit(0);     // required for any GUI applications. 

            }     // End of method main

            }     // End of class AnotherProg