在那道
里面这道题用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.
很多,很烦……
里面这道题用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.
很多,很烦……