新手练习,欢迎指正5.5
#include <stdio.h>
int main(void) {
int count,sum,day;
count=0;
sum=0;
printf(“Please enter the day:\n”);
scanf("%d",&day);
while(count++<day)
sum=sum+count;
printf(“sun = %d\n”,sum);
return 0;
}
新手练习,欢迎指正5.5
#include <stdio.h>
int main(void) {
int count,sum,day;
count=0;
sum=0;
printf(“Please enter the day:\n”);
scanf("%d",&day);
while(count++<day)
sum=sum+count;
printf(“sun = %d\n”,sum);
return 0;
}