10101
01010
10101
01010
tell the program for this pattern
Answers
Answered by
1
Answer:
Enter number of rows: 5
Enter number of columns: 5
10101
10101
10101
10101
10101
Explanation:
The above method is easy to understand and write. However, you can further optimize the previous method by removing the if else condition. The statement j%2 returns 0 if number is even otherwise returns 1. We only need to print complement of value returned by j%2.
Explanation:
follow me
Answered by
1
Answer:
if else
I guess so
ucan make it with if else
Similar questions