CBSE BOARD XII, asked by abhidev7777, 1 year ago

Write code for following pattern java
6
5 5
4 4 4
3 3 3 3
2 2 2 2 2
1 1 1 1 1 1

Answers

Answered by anirudhsingh87
1

Hello mate --

Solution

import java.util.Scanner;

class PAT

{

public static void main (String args[])

{

int n=6;

for(int I=1; i<=6; i++)

{

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

{

System.out.print( --n="+");

n--;

}

System.out.println( );

}

}

}


anirudhsingh87: Thanks bro marking my answer as. a brainliest
abhidev7777: U deserve
Similar questions