Class LoopExample

    • Method Detail

      • main

        public static void main​(String[] args)
      • while_squareNumbers

        public static void while_squareNumbers​(int limit)
        Compute all square numbers starting from 4 in steps of 3 being smaller than a given limit. The results are being written to standard output. Implemented by a while -loop.
        Parameters:
        limit - An upper exclusive bound for the highest number to be squared..
      • doWhile_squareNumbers

        public static void doWhile_squareNumbers​(int limit)
        Compute all square numbers starting from 4 in steps of 3 being smaller than a given limit. The results are being written to standard output. Implemented by a do ... while -loop.
        Parameters:
        limit - An upper exclusive bound for the highest number to be squared..