Write a program in Java to display the given pattern.
975 31
9753
975
97
9
Answers
Answered by
0
Answer:
// to display the following patter c
class Pattern1
{
public void main ()
{
int i = 9 ;
int ctr = 5 ;
for ( int e = 5 ; e>0 ; e--)
{
for (int d = ctr ; d>0 ; d--)
{
System. out. print(+i) ;
i = i - 2;
}
ctr--;
i = 9 ;
System.out. println () ;
}
}
}
I hope this solves you question
Similar questions