Given a number n then print number in Digital form.
Input : 5 Output : - - | - - | - - Input : 8 Output : - - | | - - | | - -
Take a matrix of size 5*5 and store 0 and 1 in the matrix. If matrix cell is 0 then it is used for space and if matrix cell is 1 then it is used either for horizontal or vertical line.
If row number is even then print the horizontal (-) line and if row number is odd then print the vertical ( | ) line.
- - | | - - | - -
- Program to Print Matrix in Z form
- C++ program to print all Even and Odd numbers from 1 to N
- Program to print first n Fibonacci Numbers | Set 1
- Program to print a pattern of numbers
- Program to print numbers columns wise
- Python Program to Print Numbers in an Interval
- Python program to print odd numbers in a List
- Program to Print Pyramid Pattern using numbers
- Python program to print all odd numbers in a range
- Python program to print all even numbers in a range
- Program to print numbers with diamond pattern
- Program to print all the numbers divisible by 3 and 5 for a given number
- Python program to print even numbers in a list
- Python program to print all negative numbers in a range
- Python program to print positive numbers in a list
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : Mithun Kumar