我收到以下代码标题中的错误消息
int main()
{
int day = 1;
float penny = 0.01;
while (day<32)
printf("On Day %d you had %f dollars",day, penny);
penny *=2;
day++;
}
return 0;
感谢任何和所有帮助。 :D
最佳答案
while
后缺少 {
,return 0;
后缺少 }
int main()
{
int day = 1;
float penny = 0.01;
while (day<32)
{
printf("On Day %d you had %f dollars",day, penny);
penny *=2;
day++;
}
return 0;
}
关于c - 在 Code Blocks IDE 中收到错误消息 "expected identifier or ' )' before ' }' token",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35282717/