#include <stdio.h>
#include <stdlib.h>
int main()
{
int i;
int sum;
sum = 0;
for (i = 1; i <= 100; i++)
sum = sum + i;
printf("1加到100的和");
printf("%d\n", sum);
system("PAUSE");
return(0);
}
#include <stdlib.h>
int main()
{
int i;
int sum;
sum = 0;
for (i = 1; i <= 100; i++)
sum = sum + i;
printf("1加到100的和");
printf("%d\n", sum);
system("PAUSE");
return(0);
}
沒有留言:
張貼留言