C++入门--1.0输入输出

来源:互联网 发布:哔哩哔哩动画 for mac 编辑:程序博客网 时间:2024/05/24 05:17
#include<iostream>#include<cmath>//原来C中的math.husing 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;}

原创粉丝点击