sdut-1148 相加和最大值
点击打开链接
#include <iostream> using namespace std; int main() { int a1,a2,a3,a,b,c; cin>>a1>>a2>>a3; a=a1+a2; b=a1+a3; c=a2+a3; int max; if(a>=b) max=a; else max=b; if(max>=c) cout<<max<<endl; else cout<<c<<endl; return 0; } /*************************************************** User name: YT1658506207邵雪源 Result: Accepted Take time: 0ms Take Memory: 204KB Submit time: 2017-07-26 15:45:53 ****************************************************/