#include <cs50.h>
#include <stdio.h>
int main(void)
{
int t = get_int(“no. of bricks “);
for (int i=0; i<t; i++)
{
printf(“#\n”);
}
}
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?
Reply
https://edstem.org/us/courses/176/discussion/1676837/[learn_press_profile]