I, like several others, have been stuck on pset1 c (mario) for several weeks. Particularly when it comes to printing the spaces and hashes. Could someone help me understand if I'm going about this the right way (sample pseudocode provided below)?
//Create pyramid
for (int hashQuantity = 2; hashQuantity <= height + 1; hashQuantity++)
{
//print spaces
printf (" ") * (height + 1 - hashQuantity);
//print hashes
printf ("#") * hashQuantity;
//print new line
printf ("\n");
}
As you can see, I'm trying to have spaces and the hash character printed out equal to dynamic variables (e.g. "height" and "hashQuantity"). Is this possible/as easy as I think or am I using the wrong format/going about this the wrong way? Thank you for your help.