Java Program to Print V Star Pattern

Java Program to Print V Star Pattern

Write a Java program to print V star pattern using for loop. package Shapes3; import java.util.Scanner; public class VStarPattern1 { private static Scanner sc; public static void main(String[] args) { sc = new Scanner(System.in); System.out.print(“Enter V Shape Star Pattern Rows = “); int rows = sc.nextInt(); System.out.println(“Printing V Shape Star Pattern”); for (int i = … Read more

Java Program to Print Inverted V Star Pattern

Java Program to Print Inverted V Star Pattern

Write a Java program to print inverted V star pattern or half diamond inside a square star pattern using for loop. package Shapes3; import java.util.Scanner; public class InvertedVStarPattern1 { private static Scanner sc; public static void main(String[] args) { sc = new Scanner(System.in); System.out.print(“Enter Inverted V Shape Star Pattern Rows = “); int rows = … Read more

Java Program to Print H Star Pattern

Java Program to Print H Star Pattern

Write a Java program to print H star pattern using for loop. package Shapes3; import java.util.Scanner; public class HStarPattern1 { private static Scanner sc; public static void main(String[] args) { sc = new Scanner(System.in); int i, j, k, l; System.out.print(“Please Enter H Pattern Rows = “); int rows = sc.nextInt(); System.out.println(“Printing H Star Pattern”); for … Read more

Java Program to Print Hollow Sandglass Star Pattern

Java Program to Print Hollow Sandglass Star Pattern

Write a Java program to print hollow sandglass star pattern using for loop. package Shapes3; import java.util.Scanner; public class HollowSandglassStar1 { private static Scanner sc; public static void main(String[] args) { sc = new Scanner(System.in); int i, j, k; System.out.print(“Enter Hollow Sandglass Star Pattern Rows = “); int rows = sc.nextInt(); System.out.println(“Printing Hollow Sandglass Star … Read more

Java Program to Print W Star Pattern

Java Program to Print W Star Pattern

Write a Java program to print W star pattern using for loop. package Shapes3; import java.util.Scanner; public class WStarPattern1 { private static Scanner sc; public static void main(String[] args) { sc = new Scanner(System.in); System.out.print(“Enter W Shape Star Pattern Rows = “); int rows = sc.nextInt(); System.out.println(“Printing W Shape Pattern”); for(int i = 0; i … Read more

Java Program to Print Christmas Tree Star Pattern

Java Program to Print Christmas Tree Star Pattern

Write a Java program to print Christmas tree star pattern using for loop. package Shapes3; import java.util.Scanner; public class ChristmasTreeStar1 { private static Scanner sc; public static void main(String[] args) { sc = new Scanner(System.in); System.out.print(“Please Enter Chirstmas Tree Width & Height = “); int width = sc.nextInt(); int height = sc.nextInt(); int space = … Read more

Java Program to Print 8 Star Pattern

Java Program to Print 8 Star Pattern

Write a Java program to print 8 star pattern using for loop. package Shapes3; import java.util.Scanner; public class Star8Pattern1 { private static Scanner sc; public static void main(String[] args) { sc = new Scanner(System.in); System.out.print(“Please Enter 8 Pattern Rows = “); int rows = sc.nextInt(); System.out.println(“Printing 8 Pattern of Stars”); for (int i = 1; … Read more

Java program to Print Sandglass Star Pattern

Java program to Print Sandglass Star Pattern

Write a Java program to print sandglass star pattern using for loop.  package ShapePrograms2; import java.util.Scanner; public class Sandglass1 { private static Scanner sc; public static void main(String[] args) { sc = new Scanner(System.in); int i, j, k; System.out.print(“Please Enter Sandglass Pattern Rows = “); int rows = sc.nextInt(); System.out.println(“Printing Sandglass Star Pattern”); for (i … Read more

Java Program to Print Right Pascals Star Triangle

Java Program to Print Right Pascals Star Triangle

Write a Java program to print right pascals star triangle using for loop.  package ShapePrograms2; import java.util.Scanner; public class RightPascal1 { private static Scanner sc; public static void main(String[] args) { sc = new Scanner(System.in); int i, j; System.out.print(“Enter Right Pascals Triangle Pattern Rows = “); int rows = sc.nextInt(); System.out.println(“Printing Right Pascals Triangle Star … Read more

Java Program to Print Left Pascals Star Triangle

Java Program to Print Left Pascals Star Triangle

Write a Java program to print left pascals star triangle using for loop.  package ShapePrograms2; import java.util.Scanner; public class LeftPascal1 { private static Scanner sc; public static void main(String[] args) { sc = new Scanner(System.in); int i, j, k; System.out.print(“Enter Left Pascals Triangle Pattern Rows = “); int rows = sc.nextInt(); System.out.println(“Printing Left Pascals Triangle … Read more