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_X.cpp #414

Closed cyberskull99297 closed 2 years ago

cyberskull99297 commented 2 years ago

Created Letter_X.

Issue Id you have worked upon -

Kindly write your answer here

340

Briefly explain your program logic -

Kindly write your answer here The code iterates for rows and columns between values 0 to 9 (total number of rows). During the iteration if the number of rows and the number of columns becomes equal to 4 it prints '@@@' and prints '@@' in the cases when the number of rows and the number of columns are equal. If the summation of number of rows and the number of columns equals one less than the total rows (9-1=8 in our case), it prints'##'. The code prints white space character if any of these conditions is not true and also prints a newline at the end of each row to form the required shape.

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

Attach here hacktober1 hacktober


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 Please review the pull request. I guess I have now made all the required changes in the proper manner.