I can't figure out how to make the pyramid work. My current code from the //create pyramid onward is:
//create pyramid
for (int k = n; k+1<n; k++)
printf("%d", k);
printf("#");
printf(" \n");
return (0);
}
OK, first of all, you can't expect help with such little information. For starters, your for loop sets k to n, whatever those values are, and then gives a condition, execute while k+1 is less than n, meaning it certainly wont execute, and even if it did, you are missing curly braces right after the for loop to enclose the code you want to loop meaning it would execute only the line of code immediately after the loop. Lastly for now, you seem to be printing a number, k yet the pyramid if I recall was made up of hashes:(