while循环不了,究竟错在了哪儿
这段代码暂时无法执行while循环,输入数字后不输出内容。调试信息提示:未使用调试信息生成二进制文件
线程 'Win32 线程' (0x141c) 已退出,返回值为 -1073741510 (0xc000013a)。
线程 'Win32 线程' (0x159c) 已退出,返回值为 -1073741510 (0xc000013a)。
线程 'Win32 线程' (0x1b98) 已退出,返回值为 -1073741510 (0xc000013a)。
谢谢啦
#include<stdio.h>
int main(void)
{
unsigned long sum = 0; //The sum of the integers
unsigned int i = 1; //Indexes through the integers
unsigned int count = 0; //The count of integers to be summed
//Get the count of the number of integers to sum
printf("\nEnter the number of integers you want to sum:");
scanf_s(" %u", &count);
//Sum the integers from 1 to count
while( i <= count)
sum += i;
i++;
printf("Total of the first %u numbers is %lu\n", count, sum);
return 0;
}