#include <stdio.h>
int main(void)
{
int count, sum;
int n;
printf("Enter the upper limit: ");
scanf("%d", &n);
count = 0;
sum = 0;
while (count++ < n)
sum = sum + count;
printf("sum = %d/n", sum);
return 0;
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/266558.html