- This topic is empty.
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.
IT, Programming, & Web Development › Forums › CS50’s Introduction to Computer Science by Harvard University on Edx › Week 1: [C] – Data Types, Operators, Conditional Statements, Loops, and Command Line › Mario: 5 hashes in first row, 4 hashes in second row…
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]