decode logic and print the pattern that corresponds to given input
Answers
Answered by
0
Answer:
where is input
Explanation:
follow me
Answered by
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
English,
4 months ago
Computer Science,
4 months ago
Physics,
4 months ago
Science,
8 months ago
Computer Science,
1 year ago