The codes under the Patterns section can be used to print various patterns of numbers &/or stars(*). The specific pattern to be printed is specified on the program page. The basic purpose here is to give the feel of the logic. Being similar to C/C++, the logic codes may be useful in these languages too, ...
Description: This program prints the following pattern: ******** *** *** ** ** * * ** ** *** *** ******** Primary Inputs: None Primary Output: The pattern specified above Platform Used: JDK 1.6 with JCreator Java class Pattern9 { public static void main(String args[]) { String s1 = "*"; int i, j, l = 8, x = 8, y ...
Description: This program prints the following pattern: 1 121 12321 1234321 123454321 Primary Inputs: Generates a single digit random number Primary Output: The pattern specified above Platform Used: JDK 1.6 with JCreator Java //Primary Input : Generates a single digit number (n) representing the number of lines /* Primary Output: The following pattern is ...
Description: This program prints the following pattern: * ** *** **** 1234 * ** ******* Primary Inputs: Generates a single digit random number Primary Output: The pattern specified above Platform Used: JDK 1.6 with JCreator Java //Primary Input : Generates a single digit number (n) representing the number of lines /* Primary Output: The following pattern is generated for ...
Description: This program prints the following pattern: 0 12 345 6789 01234 Primary Inputs: Generates a single digit random number Primary Output: The pattern specified above Platform Used: JDK 1.6 with JCreator Java //Primary Input : Generates a single digit number (n) representing the number of lines /* Primary Output: The following pattern is generated for n lines ...
Description: This program prints the following pattern: 0 10 101 0101 01010 Primary Inputs: Generates a single digit random number Primary Output: The pattern specified above Platform Used: JDK 1.6 with JCreator Java //Primary Input : Generates a single digit number (n) representing the number of lines /* Primary Output: The following pattern is generated for n lines ...
Description: This program prints the following pattern: 1 222 33333 4444444 Primary Inputs: Generates a single digit random number as the number of lines Primary Output: The pattern specified above Platform Used: JDK 1.6 with JCreator Java //Primary Input : Generates a single digit number (n) representing the number of lines /* Primary Output: The following pattern ...
Description: This program prints the following pattern: 1 22 333 4444 Primary Inputs: Generates a single digit random number Primary Output: The pattern specified above Platform Used: JDK 1.6 with JCreator Java //Primary Input : Generates a single digit number (n) representing the number of lines /* Primary Output: The following pattern is generated for n lines ...