Skip to content

Ashish-012/C-Patterns

Repository files navigation

Some C++ questions

Here are my solutions on some of the pattern questions. The solutions are in C++ but you can code them in any language.

WAP to print the following patterns

1)
*
**
***
****
*****

solution1

2)
    *
   **
  ***
 ****
*****

solution2

3)
1
12
123
1234
12345

solution3

4)
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15

solution4

5)
    *
   ***
  *****
 *******
*********

solution5

6)
*
**
***
****
*****
****
***
**
*

solution6

7)
    *
   ***
  *****
 *******
*********
 *******
  *****
   ***
    *

solution7

8)
*****
*   *
*   *
*   *
*   *
*****

solution8

9)
*****
 ****
  ***
   **
    *

solution9

10)
*****
  ****
    ***
      **
        *

solution10

11)
    *
   * *
  * * *
 * * * *
* * * * *

solution11

12)
    *
   **
  ***
 ****
*****
 ****
  ***
   **
    *

solution12

13) (hardest one yet)
*** ***
**   **
*     *

*     *
**   **
*** ***

solution13

14)
    1
   123
  12345
 1234567
123456789

solution14

15)
    1
   202
  30003
 4000004
500000005

solution15

16)
*    *
**  **
******
******
**  **
*    *

solution16

17)
    * * * * * 
   * * * * * 
  * * * * * 
 * * * * * 
* * * * * 

solution17

About

C++ questions on patterns

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages