标签:void sum please int main style lease scanf 语言
1、
#include <stdio.h>
int main(void)
{
int a,b;
puts("please input two integers.");
printf("a = "), scanf("%d", &a);
printf("b = "), scanf("%d", &b);
int sum = 0;
do
{
sum = sum + b;
b = b + 1;
}
while (b <= a );
printf("sum = %d.\n", sum);
return 0;
}
标签:void sum please int main style lease scanf 语言
原文地址:https://www.cnblogs.com/liujiaxin2018/p/14229873.html