Print the following pattern using JAVA
*
**
***
****
*****
Answers
Answered by
1
Print Star Pattern in Java :-
class Star
{
public static void main(String[] args)
{
int i,j;
for(i=1; i<=6; i++)
{
for(j=1; j<i; j++)
{
System.out.print("*");
}
System.out.println();
}
}
}
Thanku so much for reading my answer.
parasgoyal0201:
Thanx divyansh
Similar questions