C++入门1.0输入输出

#include<iostream>

#include<cmath>//原来C中的math.h

using namespace std;

int add(int ,int );//函数原型
int main()
{
	

	//cout<<"Come with c++ me some time"<<endl;
	////using the sqrt() function
	//
	//double x,y;
	//cout<<"请输入要计算的要开方数!"<<endl;
	//cin>>x;
	//y=sqrt(x);

	//cout<<"计算结果为 "<<y<<endl;
	//
	//cin.get();
	
	//---------------------定义一个函数----------------------

	cout<<add(2,3)<<endl;

	cin.get();
	return 0;
}
int add( int a,int b )
{
	return a+b;
}

原文地址:https://www.cnblogs.com/incyanggan/p/3176943.html