娄山中学noip吧 关注:137贴子:1,769
  • 14回复贴,共1

张大牛(jkljk67890)进

只看楼主收藏回复

在那道
里面这道题用If做是这样的:(goto版),我比较喜欢用goto……
label 1;
var
a,b,c:qword;
begin
readln(a,b,c);
if (a>b) and (a>c) then begin writeln(a); readln; goto 1; end;
if (a>b) and (c>a) then begin writeln(c); readln; goto 1; end;
if (a>c) and (b>a) then begin writeln(b); readln; goto 1; end;
if (a>c) and (b>c) and (a>b) then begin writeln(a); readln; goto 1; end;
if (a>c) and (b>c) and (b>a) then begin writeln(b); readln; goto 1; end;
if (a=b) and (c<a) then begin writeln(a); readln; goto 1; end;
if (a=b) and (c>a) then begin writeln(c); readln; goto 1; end;
if (a=c) and (b<a) then begin writeln(a); readln; goto 1; end;
if (a=c) and (b>a) then begin writeln(b); readln; goto 1; end;
if (b=c) and (a<c) then begin writeln(b); readln; goto 1; end;
if (b=c) and (a>c) then begin writeln(a); readln; goto 1; end;
if (a=b) and (c>a) then begin writeln(c); readln; goto 1; end;
if (a=c) and (b>a) then begin writeln(b); readln; goto 1; end;
if (b=c) and (a>b) then begin writeln(a); readln; goto 1; end;
if (a=b) and (a=c) and (b=c) then begin writeln(a); readln; goto 1; end;
if (c>a) and (c>b) then begin writeln(c); readln; goto 1; end;
if (c>a) and (b>c) then begin writeln(b); readln; goto 1; end;
if (c>b) and (a>c) then begin writeln(a); readln; goto 1; end;
if (c>b) and (a>b) and (c>a) then begin writeln(c); readln; goto 1; end;
if (c>b) and (a>b) and (a>c) then begin writeln(a); readln; goto 1; end;
if (b>a) and (b>c) then begin writeln(b); readln; goto 1; end;
if (b>a) and (c>b) then begin writeln(c); readln; goto 1; end;
if (b>c) and (a>c) and (a>b) then begin writeln(a); readln; goto 1; end;
if (b>c) and (a>c) and (b>a) then begin writeln(b); readln; goto 1; end;
readln;
1:end.
很多,很烦……



IP属地:上海1楼2012-05-02 19:30回复
    就是比较三个数大小的题……


    IP属地:上海2楼2012-05-02 19:31
    回复
      大牛我不信这道题目看不花死你


      IP属地:上海3楼2012-05-02 19:39
      回复
        24个if,zerojudge上传了5、6次,做了两天………………


        IP属地:上海4楼2012-05-02 19:40
        回复
          你的确很空,那就做做回家作业吧,答案我贴了,你也可以参考下


          5楼2012-05-02 19:57
          收起回复
            不是不许用IF 么。。。


            IP属地:上海6楼2012-05-06 10:04
            回复
              这囧男是何方神圣啊


              IP属地:上海7楼2012-05-06 20:29
              收起回复
                没兴趣做高精度?


                8楼2012-05-10 18:43
                回复