求1+2+3.......+n的值且n大于零小于200,这样做对吗
#include<stdio.h>
int main()
{
int N,a;
a=0;
a=a+N;
while (N>0&&N<200);
N++;
printf("%d\n","1到N的和") ;
return 0;
#include<stdio.h>
int main()
{
int N,a;
a=0;
a=a+N;
while (N>0&&N<200);
N++;
printf("%d\n","1到N的和") ;
return 0;
2016-01-28
举报