Computer Science, asked by susuthar968, 7 months ago

print a pattern in odd number as

9 7 5 3 1
9 7 5 3
9 7 5
9 7
9

Answers

Answered by vineetmishra1208
1

Answer:

class pattern

{

public static void main(String args[])

{

int k=9;

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

{

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

{

System.out.print(k);

k=k-2;

}

System.out.println();

}

}

}

Explanation:

HOPE IT WILL GOING TO HELP YOU ,IF YES PLEASE MARK AS A BRAINLIST

Similar questions