1.7

来源:互联网 发布:井之原快彦 知乎 编辑:程序博客网 时间:2024/05/19 12:11
#include<iostream>using namespace std;int main(){    int max(int x,int y,int z);    int x,y,z,temp;    cin>>x>>y>>z;    temp = max(x,y,z);    cout<<"the max is"<<" "<<temp<<endl;        return 0;}int max(int x,int y,int z){    int temp;    if(x>y)    {        temp = x;    }    else    {        temp = y;    }    if(z>temp)    {        temp = z;    }    return temp;}

0 0
原创粉丝点击