plain/semester_1/erg5_ask1/Erg5_Ask1.java
public static void main(String[] args) {
        
        int num, timhDynamhs;
        
        do { System.out.print("enter a number between 2 and 5: ");
            num = scannerUserInput.getInteger();
        }
        while ( num < 2 || num > 5 );
        System.out.println("the number is " + num + ".");
       
        System.out.println("the powers of " + num + " are:");
        
        timhDynamhs = num;
        
        while (timhDynamhs <= 1000) {
            System.out.println(timhDynamhs);
            timhDynamhs = timhDynamhs * num;
            
        }
        
    }
/**
     * @param args the command line arguments
     */
@param args the command line arguments
@param args the command line arguments
public static void main(String[] args) {
        int num, timhDynamhs;
        do { System.out.print("enter a number between 2 and 5: ");
            num = scannerUserInput.getInteger();
        }
        while ( num < 2 || num > 5 );
        System.out.println("the number is " + num + ".");
        System.out.println("the powers of " + num + " are:");
        timhDynamhs = num;
        while (timhDynamhs <= 1000) {
            System.out.println(timhDynamhs);
            timhDynamhs = timhDynamhs * num;
        }
    }
public static void main ( String [ ] args ) { int num , timhDynamhs ; do { System . out . print ( "enter a number between 2 and 5: " ) ; num = scannerUserInput . getInteger ( ) ; } while ( num < 2 || num > 5 ) ; System . out . println ( "the number is " + num + "." ) ; System . out . println ( "the powers of " + num + " are:" ) ; timhDynamhs = num ; while ( timhDynamhs <= 1000 ) { System . out . println ( timhDynamhs ) ; timhDynamhs = timhDynamhs * num ; } }
@param args the command line arguments
@param args the command line arguments