• This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #401

      #include <cs50.h>
      #include <stdio.h>

      int main(void)
      int t = get_int(“no. of bricks “);
      for (int i=0; i<t; i++)

      Seeking hints/help regarding formulating a suitable loop that will help print 1 hash in the first line, 2 hashes in the second line, 3 hashes in the third line and so on.

      Is there a way to multiply the output with printf command.

      On first row, 1x#.

      Second row, 2x#

      Third row, 3x#.

      While printf(“#\n”) taking care of printing 1 hash and moving to next line, is there a way to leverage the printf command with loop to print # twice for second row, and so on?





    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.
    Scroll to Top