Star printing program in Java, pattern 5

Star printing program in Java: pattern 5

Here is the code for this pattern:

import java.util.Scanner;

public class star {
    public static Scanner sc = new Scanner(;

    public static void main(String[] args) {
        int n, i, j, k;
        System.out.println("How many row you want: ");
         n = sc.nextInt();
                     System.out.print(" ");





Try this in C.

Related post :

How to print Stars pattern in C                                          How to print Stars pattern in Java

Previous pattern                                                                                                         Next pattern

1/Post a Comment/Comments

  1. Excellent post, now a day’s huge demand for the certified java professionals in IT industry. Java gives more career opportunity for the fresher’s as well as experienced experts.
    JAVA Training in Chennai|JAVA Course in Chennai


Post a Comment