0
1.9kviews
Write a java program to print the following pattern (take input for number of rows from the command line)
1 Answer
| written 9.7 years ago by |
Import java.io.*;
Class NumberTriangle
{
Public static void main (String args[])
{
Int num = Integer.parseInt(args[0]));
for (int i=1; i<=num; i++)
{
for(int j=1; j<=i; j++)
{
System.out.println (ā+i+ā);
}
System.out.println(ā\nā);
}
}
}