pattern related programs in java
Simple triangle star pattern 1) Enter a number : 4 * * * * * * * * * * import java.util.Scanner; public class Pattern1 { public static void main( String [] args) { Scanner scanner = new Scanner ( System . in ); System . out .println("Enter a number :"); int n = scanner.nextInt(); for ( int i = 1; i <= n; i++) { for ( int j = 1; j <= i; j++) { System . out .print("*"); } System . out .println(); } } } 2) Enter a number : 4 * * * * * * * * * * import java.util.Scanner; public class Pattern2 { public static void main( String [] args) { Scanner scanner = new Scanner ( System . in ); System . out .println("Enter a number :"); int n = scanner.nextInt(); for ( int i = n; i > 0; i--) { for ( int j = 0; j < i; j++) { System . out .print("*"); } System . out .println(); } } } 3) Enter a number :4 ...