#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」の使用。for (int p = 0; p <= o; p++) ^
そのすぐ上の行で「0」を宣言しましたが、なぜこのエラーが発生するのかわかりません。助けてください、私はcに非常に慣れていないので、どんな洞察も大歓迎です。ありがとう!