Is it ok that I paste my code in here?
Edit:
here here is my code thus far thanks for your help!!
#include <stdio.h> #include <cs50.h> #include <string.h>
int main (void)
{
//asks user for the number of blocks printf("Please specify the number of blocks to be printed\n");
//declares a variable t to store the users input (number of blocks) int t;
//retrieve block number from user do { t = GetInt(); } while (t > 23 && t < 0)
//confirms to the user that the input has been accepted
#include <stdio.h>
#include <cs50.h>
#include <string.h>
int main (void)
{
//asks user for the number of blocks
printf("Please specify the number of blocks to be printed\n");
//declares a variable t to store the users input (number of blocks)
int t;
//retrieve block number from user
do
{
t = GetInt();
}
while (t > 23 && t < 0)
//confirms to the user that the input has been accepted
if (t < 23 && t > 0)
{
printf("Thank you %i blocks with be generated, t"); //error message here "error: more '%' conversions than data arguments" need help with this please
printf("\n");
}
//pyramid generation (my hashes always come out in a straight line one space apart)
for (int i = 0; i < t, i++)
{
printf("%c, t"); //(How do I represent x number of spaces that corresponds to the t variable that is based on user input??
printf("#");
printf("\n");
}
}
//pyramid generation (my hashes always come out in a straight line one space apart) for (int i = 0; i < t, i++) { printf("%c, t"); //(How do I represent x number of spaces that corresponds to the t variable that is based on user input?? printf("#"); printf("\n"); }
}