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

Create Letter_Y.cpp #395

Closed cyberskull99297 closed 2 years ago

cyberskull99297 commented 2 years ago

Issue Id you have worked upon -

Kindly write your answer here

341

Briefly explain your program logic -

Kindly write your answer here

The code iterates for rows and columns upto 9. It prints '@@' and '##' character at required places for number of rows less than 5. For number of rows and number of columns equal to 4, it prints '@@##' which completes the upper part of the letter Y. When number of rows become greater than or equal to 5 it prints the lower part of the letter by printing '@@'. The places other than characters, is printed with a new space. It also prints a newline after each row to form the required shape of the letter.

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

Attach here Hacktober Y Y Hacktoberfest


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 -

cyberskull99297 commented 2 years ago

@SarthakKeshari Kindly acknowledge the pull request for letter Y.