赞
踩
#include <stdio.h>
#include <stdlib.h>
int main(void )
{ int i,n,sum;
printf("input n;");
scanf("%d",&n);
sum = 0;
for(i=1;i<=n;i++)
{
sum=sum+i;
}
printf("sum=%d\n",sum);
return 0;
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。