求大虾帮忙挑错,最好能注明原因
#include <stdio.h>main()
{
long num;
long sum=0L;
printf("Please enter an integer to be summed.");
status = scanf("%ld",&num);
while(status==1)
{
sum=sum+num;
printf("Please enter next integer (q to quit):");
status = scanf("%ld",&num);
}
printf("Those integers sum to %ld.\n",sum);
}
好像和status有关系