print the pattern
1
123
12345
using q basic (for while/do while)
Answers
Answered by
1
import Java. up. *.;
class p
{
public static void main(String args[])throws Exception
{
int i, j,n=1;
for(i=1;i<=3;i++)
{
for(j=1;j<=n;j++)
{
System. out. print(j);
}
n=n+2;
System. out. println();
}
}
}
1
123
12345
Similar questions