数学建模社区-数学中国

标题: 是男人亮起来,有比我还短的吗?跪求虐~!求回复 [打印本页]

作者: wangzheng3056    时间: 2013-8-6 09:51
短也是有原因的,现在我告诉大家为什么这样短$ t9 a7 `( B/ V' L5 G1 q& U
编程达人-短码之美
作者: 凌烟00    时间: 2013-10-5 21:27
#include<stdio.h>
: e( _' e- D% `# `& }void main()* H/ E# Z/ l7 z! ^; c
{
2 a" w6 e, @, ], y/ ~  n6 f/ [( O9 a8 n        int max=0,temp;  b7 X& M" v, |7 T% W) {
        for (int i=0;i<10;i++)9 C$ k/ `8 V0 V1 {" j; f
        {
8 A& C+ w  ^' H# a% G& [6 U, O& S                if(scanf("%d",&temp)==1&&temp>max) max=temp;
4 w, q# L) r3 a; }0 L: v, K7 u3 g        }
6 T- k+ ]( ^" n0 t1 U8 z6 Y        printf("%d\n",max);7 ?- f" U, t* g
}
% d- _: K1 ?9 G% S4 B@wangzheng3056,短了一行,说好的50个体力呢
作者: polgageorge    时间: 2014-1-8 23:46
#include&lt;iostream.h&gt;
% x0 V3 n! M6 [2 ~/ s& C, cvoid main() {6 O! i2 h' R( F' B) ~
for(int j=max=temp=0;j&lt;10;j++) {9 }8 Q5 r' E; @% H' w: N( e* H. e4 k
cin &gt;&gt; temp
; x% J8 g; Y$ B* q, o2 Iif((max &lt; temp) max=temp
/ V" [6 i$ N9 i) P1 |}
  G8 I5 B* \! S4 U, G& Q* u* ocout &lt;&lt; max8 T' T+ v  l/ u0 V
}
1 u7 R+ A" u- _" D3 B
作者: 慢跑20    时间: 2014-2-14 14:56
#include<stdio.h>
/ @# w) _! }3 zvoid main()
7 F- [  f7 G6 |9 F6 z{
2 x* ~/ |+ n3 d4 Gint max=0,temp,i=10;
4 t6 z8 B' F8 j. ?* D: kwhile(i--)4 D5 z% ~! T  \& B' ~+ p! a% s
{% r( v. K' b  N) K, `  A5 W
if(scanf("%d",&temp)==1&&temp>max)max=temp;- a* Y) ^% e. v  l
}
) {, l" I$ ~" dprintf("%d",max)
! A) Q9 _; ^2 U}4 p7 w2 K: @& ^6 K% [& k- W
6 G4 U7 s  y# J
哇哈哈2 @  S% g: y1 E2 P; w

作者: KOF97    时间: 2014-8-21 22:23





欢迎光临 数学建模社区-数学中国 (http://www.madio.net/) Powered by Discuz! X2.5