I will continue in this article solving the first set of C tasks from CS50 , while listening to Savant's new album, Jester , which is by the way freaking awesome! So the task is to accept an integer and than draw two half-pyramids (rectangles if you wish so). Example: Input: 3 Output: # # ## ## ### ### We could ask all the same questions, as we done it in the previous task , so I will not bore you with that. I will jump into thinking about the solution! So, if we call the input as N, we can observe, that the output will be a matrix, and the height of the matrix now is N, and the width of the matrix this time is 2N+1, meaning, that in the last row we will draw twice the times the hashtags as the input number plus one tiny separator white space. Plan to solve the problem: Get an integer from the user Validate if the integer is bigger than zero. If not, then terminate. Else draw N-(current row number) spaces, N times the hashtags, a space, N times the hashtags a
Harvard runs an introductory computer science course, called CS50. The purpose of the said course is to give a taste of programming to the students. During the 12 lessons there are multiple programming languages one get exposed to upon completing the series, so far I've got introduced to Scratch and the very basics of C. Last year I already tried to get into the course, but as usual I only made the first lesson. Now I'm jumping straight into the C parts to avoid getting bored with the repeated lesson. In the CS50 series each lesson has problem sets, homework assignments which are testing the level of understanding of the given subject. In Lesson 1 there are four tasks to complete, and during this week I will complete them and write here how I've tackled them, primary because I think these tasks could be great candidates for software engineer coding interviews. Task 1: Mario level 1 (PSET 1 - 1/4) The task is to create a software, which fulfills