few Classics for the maximum among three digits

来源:互联网 发布:office软件删除 编辑:程序博客网 时间:2024/06/07 09:52

#include<iostream.h>

1    max=(a>=b?a:b)<:(a>=b?a:b);

2    max=(t=a>=b?a:b)<c?c:t;

3    if(a>=b)t=a,else t=b; if(t<c)max=c;else max=t;

4    if(a>=b&&a>=c) cout<<c<<&apos;/n&apos;;
if(b>=a&&b>=c) cout<<b<<&apos;/n&apos;;
5    t=max(a,b);
t=max(t,c);
cout<<t<<&apos;/n&apos;;

....

 

原创粉丝点击