+ 2
Print the pattern in java
1 3 5 7 9 11 13 15
4 Antworten
+ 17
● might pattern is not correct, as the logic for number of elements in a row is not shown properly or incorrect, please correct that.
//here is basic way to solve it, after correction :
● 1 outer loop for number of rows & inside it 2 inner loops(one for space in beginning of each row & 1 for printing odd numbers in each row).
+ 15
Use nested for loops
And use one variable and intilize with 1 and increment with 2 in inner for loop becz in this pattern all the number are odd.
+ 2
https://code.sololearn.com/cL2zZ5VfEcwh/?ref=app