三个数之间求最大值

来源:互联网 发布:死飞淘宝店 编辑:程序博客网 时间:2024/05/01 17:36

#include <iostream>
using namespace std;
int main ()
{
int a,b,c,d;
cout<<"请输入三个数字"<<endl;
cin>>a>>b>>c;
   if(a>b)
{d=a;
}else{
    d=b;}
    if(c>d)
    {cout<<"最大值为"<<c<<endl;}
    else{
     cout<<"最大值为"<<d<<endl;}
    return 0;


}

原创粉丝点击