摘要: // chapter1.4.4.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include <iostream>int _tmain(int argc, _TCHAR* argv[]){int sum = 0, value;while(std::cin>>value){sum+=value;}std::cout<<"Sum... 阅读全文
posted @ 2010-06-20 16:18 南守拥 阅读(312) 评论(0) 推荐(0) 编辑
摘要: // chapter1.4.3.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include<iostream>int _tmain(int argc, _TCHAR* argv[]){std::cout<<"Enter two numbers:"<<std::endl;int v1,v2;std::cin>>v... 阅读全文
posted @ 2010-06-20 15:39 南守拥 阅读(249) 评论(0) 推荐(0) 编辑
摘要: // chapter1.4.2.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include <iostream>int _tmain(int argc, _TCHAR* argv[]){int sum = 0;for(int val = 1; val <= 10; ++val){sum += val;}std::cout << ... 阅读全文
posted @ 2010-06-20 14:05 南守拥 阅读(231) 评论(0) 推荐(0) 编辑