#include <stdio.h>
#include <cs50.h>
int main(void)
{
int height;
{
printf("Please select a height value between 1-23.");
height = GetInt();
while (height < 1 || height > 23)
{
printf("Height mustbe between 1-23, please choose new value.\n");
height = GetInt();
}
{
for (int n = 0; n < height; n++)
for (int o = 0; o + n + 1 < height; o++)
{
printf(" ");
}
for (int p = 0; p <= o; p++)
{
printf("#");
}
}
}
}
// 我不断收到这个错误:
使用未声明的标识符“o”。对于 (int p = 0; p <= o; p++) ^
我在其正上方的行中声明了“0”,我似乎无法弄清楚为什么它给了我这个错误。请帮忙,我对c非常陌生,非常感谢任何见解。谢谢!