• Skip to main content
  • Skip to footer

SoftwareProg.com

Software programming learning aide

  • Blog
    • Discussion
  • News
  • CS50’s Introduction to Computer Science by Harvard University on Edx
    • Week 1
    • Week 2
    • Week 3
    • Week 4
    • Week 5

Mario: 5 hashes in first row, 4 hashes in second row…

CS50 threads to aide as a supplementary resource › Forums › CS50’s Introduction to Computer Science by Harvard University on Edx › Week 1 › Mario: 5 hashes in first row, 4 hashes in second row…

  • This topic is empty.
Log In Register Lost Password
Viewing 1 post (of 1 total)
  • Author
    Posts
  • August 13, 2022 at 8:36 am #409
    admin
    Keymaster

      Continuing with my previous post https://edstem.org/us/courses/176/discussion/1676837/, intend to have 5 hashes in the first row, 4 hashes in the second row, and so on.

      This is my tentative code:

      #include <cs50.h>
      #include <stdio.h>
      
      int main(void)
      {
      int n = get_int("no. of bricks ");
          for (int i = 0; i < n; i++)
          {
              for (int j = n; j < 1 ; j--)
               {
              printf("#");
               }
          printf("\n");
          }
      }
      
      


      Reply


      https://edstem.org/us/courses/176/discussion/1678010/[learn_press_profile]

    • Author
      Posts
    Log In Register Lost Password
    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.
    Log In

    Log in / Register

    Initiative by Digital Splendid OPC Pvt. Ltd.