Q. Write a C program to print the following number rhombus pattern design as:
1 1
2 2
3 3
4 4
5 5
4 4
3 3
2 2
1 1
Ans.
1 1
2 2
3 3
4 4
5 5
4 4
3 3
2 2
1 1
Ans.
![]() |
| Figure: Google product list-download a copy |
| S.No. | Decimal | Binary |
| 1. | 0 | 0 |
| 2. | 1 | 1 |
| 3. | 2 | 10 |
| 4. | 3 | 11 |
| 5. | 4 | 100 |
| 6. | 5 | 101 |
| 7. | 6 | 110 |
| 8. | 7 | 111 |
| 9. | 8 | 1000 |
| 10. | 9 | 1001 |
| 11. | 10 | 1010 |
| Rules No. | Condition | Result | Remark |
| 1. | 0 + 0 | 0 | - |
| 2. | 0 + 1 | 1 | - |
| 3. | 1 + 0 | 1 | - |
| 4. | 1 + 1 | 0 | carry 1 to next column |
| 5. | 1 + 1 + 1 | 1 | carry 1 to next column |
![]() |
| Figure: How to add two binary numbers in computer |