摘要:
// 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... 阅读全文
摘要:
// 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... 阅读全文
摘要:
// 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 << ... 阅读全文