copyright 1998 by brian zhou this is by far none of my best code problem on each pull of the slot machine four single digit numbers appear the machine pays accoring to the following chart result payoff 4 of a kind 400 100d 3 of a kind 200 50d 2 pairs 100 40 d1 d1 1 pair 100 50d 4 different 0 in this table d represents the value of the matching digit for example if the result of the draw was 4 8 4 and 4 the payoff would be 400 200 50 4 a draw of 2 7 0 7 would pay 450 100 50 7 and a draw of 7 3 3 7 would pay 500 100 40 3 7 program slot machine uses crt Var N Array 0 9 of Byte input array 1 4 of byte i byte pairs byte pair array 1 2 of byte three four boolean payoff integer enter string p byte pp integer begin clrscr pairs 0 for i 0 to 9 do n i 0 write \'enter n n n n \' readln enter val enter 1 input 1 pp val enter 3 input 2 pp val enter 5 input 3 pp val enter 7 input 4 pp write input 1 \' \' input 2 \' \' input 3 \' \' input 4 for i 1 to 4 do inc n input i for i 0 to 9 do begin if n i 2 then begin inc pairs if pairs 1 then pair 1 i else if pairs 2 then pair 2 i end else if n i 3 then begin three true payoff 200 50 i end else if n i 4 then begin four true payoff 400 100 i end end if pairs 1 then payoff 100 50 pair 1 else if pairs 2 then payoff 100 40 pair 1 pair 2 writeln write \'payoff \' payoff readkey end SAUCE00slot machine source irrational think 9980126og