Number patterns set 4

You are currently viewing Number patterns set 4
Number patterns set 4-

When we talk about the interview questions apart from theoretical part coding skill is also important. If you have been following our patterns series then you are on the right track of cracking the coding interview.

In this series we have learn how to print star patterns , English alphabet patterns and character patterns. Now time to print some number patterns.

Below you will find the code to print different types of number pattern using Java , C++ , Python and JavaScript.

In this blog we have shared set 4 of 50+ number patterns, you can find all number patterns here.

Here are the some quick links for more patterns 

Click on the pattern given below and you will get redirected to the code.

Pattern 1

        1 
       1 2 
      1 2 3 
     1 2 3 4 
    1 2 3 4 5 
   1 2 3 4 5 6 
  1 2 3 4 5 6 7 
 1 2 3 4 5 6 7 8 
1 2 3 4 5 6 7 8 9 

Code for pattern 1

Pattern 2

9 9 9 9 9 9 9 9 9 
 8 8 8 8 8 8 8 8 
  7 7 7 7 7 7 7 
   6 6 6 6 6 6 
    5 5 5 5 5 
     4 4 4 4 
      3 3 3 
       2 2 
        1 

Code for pattern 2

Pattern 3

1    
12   
123  
1234 
12345
1234 
123  
12   
1  

Code for pattern 3

Leave a Reply