Computer Science, asked by jasvanthrajesh47, 8 months ago

decode logic and print the pattern that corresponds to given input​

Answers

Answered by sacaretorr
0

Answer:

where is input

Explanation:

follow me

Answered by thebrain47
0

HERE IS YOUR ANSWER

import java.util.*;

class pro

{

 public static void main(String args[])

{

int c=0;int t=0;

System.out.println(“Enter the length”);

int n=sc.nextInt();

int res=(n*n) - 1;

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

{ t=res;

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

{ c++;

System.out.print(c);

}

for( int k=1;k<= n-(i-1);k++)

{

System.out.print(t);

t++;

}

res=res-(i+1);

System.out.println();

}

HOPE IT HELPS YOU

PLEASE MARK AS BRAINLIEST

Similar questions