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
Science,
5 months ago
Social Sciences,
5 months ago
History,
5 months ago
English,
10 months ago
English,
1 year ago