内置函数


#include <iostream>
using namespace std;

int max(int x ,int y,int z);

int main()
{
    
    int a,b,c,m;
    cout<<"请你输入三个整型的数字:"<<endl;
    cin>>a>>b>>c;

    m=max(a,b,c);//实际参数 ,代表具体数值,在()当中 
    cout<<"The max of a b and c is:"<<m<<endl;
    system("pause");
    return 0;
}
//内联函数 一个关键字inline 
inline int max(int x ,int y,int z){
    if(z>x)
    x=z;
    if(y>x)
    x=y;
    return x;
}

 

posted @ 2017-11-16 14:11  TOTO2  阅读(132)  评论(0)    收藏  举报