0

How to print this pattern written in description?

* $* *$* $*$* *$*$*

22nd Nov 2021, 6:18 PM
Rahul Jain
Rahul Jain - avatar
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
22nd Nov 2021, 6:31 PM
Stuvan
Stuvan - avatar
+ 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.
22nd Nov 2021, 6:40 PM
Stuvan
Stuvan - avatar
0
Can you describe loop statements please
22nd Nov 2021, 6:35 PM
Rahul Jain
Rahul Jain - avatar
0
I understand the concept but can't able to apply it in code
22nd Nov 2021, 6:36 PM
Rahul Jain
Rahul Jain - avatar