1
3 1
5 3 1
7 5 3 1
9 7 5 3 3 1
Write the program to display the following pattern
Answers
Answered by
0
Answer:
Answer in the attachment.
output:
1
3 1
5 3 1
7 5 3 1
9 7 5 3 1
Attachments:
![](https://hi-static.z-dn.net/files/d54/9a650c0a1822a43db4efa8160f8bcfdc.jpg)
Answered by
0
Output:
1
3 1
5 3 1
7 5 3 1
9 7 5 3 3 1
Program (java) :
public class Main
{
public static void main(String[] args) {
for(int i=0;i<=4;i++){
for(int j=(2*i)+1;j>=1;j=j-2){
System.out.print(j+" ");
}
System.out.println();
}
}
}
Similar questions