Write a java program to print the following pattern
Answers
Answered by
4
Explanation:
begin the first loop from 0 to 3 i++
next loop from 1 to 10
in second loop print i,i+1.i++
println()
hope it helps ........
Answered by
17
public class Brainly
{
public static void main (String args[])
{
int k = 3;
int m = 1;
for(int i=1; i<=4 ; i++)
{
for (int p=1; p<=k ; p++)
{
System.out.print(" ");
}
for(int j=1; j<=I ; j++)
{
System.out.print(m);
m++;
}
System.out.println( );
k - -;
}
}
}
I've attached the output
Hope this helps you. ♡
Attachments:
Similar questions