新人求助(不简单的scanf)
#include<stdio.h>int main()
{
short a=0,i=1;
int total=6;
printf("The number of people:\n");
scanf("%d",&a); //在这一步后total变成了0
for(;i<a;i++)
{
total=total*5+1;
}
printf("Total is %d\n",total);
return 0;
}
请大佬解答,谢谢大佬
[此贴子已经被作者于2020-10-11 09:49编辑过]