Computer Science, asked by duttadeeptangsh, 11 months ago

Print the following pattern in java


12345
1234
123
12
1

Answers

Answered by Anonymous
2

Answer:

Hey mate ✌️

Explanation:

public class Pattern

{

public static void main ()

{

for ( int i = 5 ; i > = 1 ; i ++)

{

for ( int j = 1 ; j < = i ; j + + )

{

System.out.print (" pattern is :"+ j);

}

System.out.println ( );

}

}

}

Hope it helps ❣️❣️

Answered by chetan8144487556
1

Answer:

Explanation:#include <stdio.h>

#include<conio.h>

void main()

{

   int i, j;

   for(i=5;i>=1;i--)

   {

       for(j=1;j<=i;j++)

       {

           printf("%d",j);

       }

       printf("\n");

   }

}

Output:

12345

1234

123

12

1

Similar questions