6. Program in Java to print the following right-angled triangle of asterisks n times:
* ** *** **** *****
Answers
Answered by
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