• Skip to main content
  • Skip to footer

CS50's Introduction to Computer Science on Edx: Supplementary resource

CS50 threads to aide as a supplementary resource

Mario: Forming first row

CS50 threads to aide as a supplementary resource › Forums › CS50’s Introduction to Computer Science by Harvard University on Edx › Week 1 › Mario: Forming first row

  • This topic is empty.
Log In Register Lost Password
Viewing 1 post (of 1 total)
  • Author
    Posts
  • August 13, 2022 at 12:25 pm #414
    admin
    Keymaster

       

      As part of solving Mario problem, I have broken it into first coming out with the first row with # on the last column. Even this appears tricky to me! Any tips or hints appreciated as to how to modify with the following initial code:


      Copy Code
      Copied
      Use a different Browser

      
      
      #include <stdio.h>
      #include <cs50.h>
      
      int main(void)
      {
          int t = get_int("height\n");
          for (int i = 0; i <t; i++)
          {
              printf("#");
          }
      }

      Perhaps need to build with t – 1 taking dots or blank spaces and t taking #.


      Reply


      https://edstem.org/us/courses/176/discussion/1678193[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.