Computer Science, asked by anki469, 11 months ago

6. Program in Java to print the following right-angled triangle of asterisks n times:
* ** *** **** *****

Answers

Answered by kavyasaxena106
1

Answer:

class xyz

{

public static void main (String args[ ])

{

for (int i =1;1<=5;i++)

{

for (int j=1;j<=i;j++)

{

System.out.print("*");

}

System.out.println();

}

}

}

Similar questions