if input is::44 4 4 43 3 32 212 23 3 34 4 4 4
program::
public class Comment {public static void main( String arg[]){int input = 4; //change it accordinglyfor(int i=1 ; i<=input ; i++){for(int j=1 ; j<=input-i+1 ; j++){System.out.print(input-i+1+" ");}System.out.println();}for(int k=input-1; k>0 ; k--){for(int l=2 ; l<=input-k+2 ; l++){System.out.print(input-k+1+"...
Creating Number Patterns In Java
Here are some common number patterns and Related Logic:
Pattern 1.
To Print this pattern use the following code:
public class numPtr {
public static void main( String arg[]){
...
Printing Star Patterns In Java
In Java language you can print triangle shape using for loop and also using while loop, here i will show you in simple way to print triangle.
Print star pattern in java
class StarTriangle
{
public static void main(String[] args)
{
int i,j,k;
for(i=1;...