Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
115329 王镜铭 求三个数的最大值 C++ Compile Error 0 MS 0 KB 300 2025-03-30 11:40:55

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ long long a,b,c; cin>>a>>b>>c; if(a>b>c)cout<<"max="<<a; else if(a>c>b)cout<<"max"<<a; else if(b>a>c)cout<<"max="<<b; else if(b>c>a)cout<<"max="<<b; else if(c>a>b)cout<<"max="<<c; else if(c>b>a)cout<<"max="<<c return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:6: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
  if(a>b>c)cout<<"max="<c>b)cout<<"max"<a>c)cout<<"max="<c>a)cout<<"max="<a>b)cout<<"max="<b>a)cout<<"max="<