0

Sorry, here is the code in full with a few format alterations, thanks

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

int main(void)

            // Get input of the height

{ int n;

do { n = get_int("Height: "); } while ( n < 1 || n > 8 ); }

// Print desired pyramid height

for(int i=0 ; i<n; i++);

{ for(int j=0; j<n; j++); {

if(i+j<n-1)

     printf(" ")

else print("#"); } print("\n"); }

1 Answer 1

0

can you please copy paste the code in the correct format? Makes it easier to see

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .