// page107.cpp : 定义控制台应用程序的入口点。
//C++ 面向对象程序设计
//演示for循环
#include "stdafx.h"
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int sum = 0 ;
for (int n = 0 ; n <= 10 ;n++)
{
sum = sum + n;
}
cout << "The sum of the number 1to 10 is ";
cout << sum << endl;
cin >> sum;
return 0;
}