0
How to print this pattern written in description?
* $* *$* $*$* *$*$*
4 Respuestas
+ 3
Observing and understanding a problem is first step.
Here row is 5
Column is equal to the number of row
If you plot this on graph like
(1,1)
(2,1)(2,2)
(3,1)(3,2)(3,3)...
And plus row and column like
2
3, 4
4, 5, 6...
You will get to know that * is placed in even number
and $ sign is placed at odd place
+ 2
Create a loop which run through 1 to numbers of row.
After create a nested loop which run through 1 to the number of first loop initialized variable.
Inside nested loop you have to write the logic of odd and even number.
0
Can you describe loop statements please
0
I understand the concept but can't able to apply it in code