SarthakKeshari / CPP-Questions-and-Solutions

This repository aims to solve and create new problems from different spheres of coding. A path to help students to get access to solutions and discuss their doubts.
MIT License
47 stars 132 forks source link

Print Letter M #334 #420

Closed saurabh042 closed 2 years ago

saurabh042 commented 2 years ago

Choose your form and fill it -

1. Form 1(C++ Solution contributors)

2. Form 2(C++ Documentation Contributors)


1) Form 1

Issue Id you have worked upon -

Letter M #334

Briefly explain your program logic -

The Letter M can be broken down into 3 parts

The entire pattern can be considered as a 2D array, where each row has some characters and whitespaces. There is a pattern in the number of whitespaces each row has at the beginning, middle and at the end which is dependent on the row number. In my implementation, I have established this relation and printing character string based on that.

Screenshots(Attach 2 screenshots of your own input and output) -

Attach here image


Checklist:

Eg - If your code follow the below guidelines. Kindly change [] to [x]

All the conditions should be fulfilled for considering your code for merging -


2) Form 2

Issue Id you have worked upon -

Kindly write your answer here


Checklist:

Eg - If your code follow the below guidelines. Kindly change [] to [x]

All the conditions should be fulfilled for considering your Pull Request for merging -