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:
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
Math,
1 month ago
Science,
3 months ago
Business Studies,
3 months ago
Math,
10 months ago
Math,
10 months ago