-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStar.java
More file actions
22 lines (17 loc) · 407 Bytes
/
Copy pathStar.java
File metadata and controls
22 lines (17 loc) · 407 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import java.util.*;
class Star
{
public static void main(String args[])
{
int i,j,n;
System.out.println("enter no. of stars:");
Scanner sc=new Scanner(System.in);
n=sc.nextInt();
for(i=0;i<n;i++)
{
for(j=0;j<=i;j++)
System.out.print("*");
System.out.println("\n");
}
}
}