Star printing

Star printing


Star printing

import java.util.*;
class star
{
    public static void main()
    {
        int a,b,c;
        Scanner sc=new Scanner(System.in);
        System.out.print("Enter you how much row and column you want : ");
       c=sc.nextInt();
        for (a=1;a<=c;a++)
        {
            for (b=1;b<=a;b++)
          {
            System.out.print("*");
          }
        System.out.println("");
       }
}
}

OUTPUT

Star printing

Post a Comment

0 Comments