Computer Science, asked by Ileana12, 1 year ago

Write a java program to print the following pattern
 \qquad \:  \:  \: 1 \\  \quad  \:  \:   \:  \: \: 2 \: 3 \\  \quad  \: \: 4 \: 5 \: 6 \\  \: 7 \: 8 \: 9 \: 10

Answers

Answered by roh4
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 Shraddha00
17

\huge{\fbox{\bf{CODING}}}

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