C program to print the following pattern: 1 2 4 1 3 5 2 4 6 8 1 3 5 7 9

C program to print the following pattern:


1
2 4
1 3 5
2 4 6 8
1 3 5 7 9
Solution: