Computer Science, asked by parasgoyal0201, 11 months ago

Print the following pattern using JAVA

*
**
***
****
*****

Answers

Answered by divyansh067
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
parasgoyal0201: Guri88 absolutely wrong
divyansh067: My pleasure..
divyansh067: You can also help me by making my answer brainlist or by clicking on the thank you button..
Similar questions