#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
int i;
int sum;
sum=0;
for( i = 1 ; i <= 100 ; ++i )
sum=sum+i;
printf("從1+2+3...+100=%d",sum);
system("pause");
return EXIT_SUCCESS;
}
沒有留言:
張貼留言