if (($S1==$MAX or $S1==$MAX2 or $S1==$MAX3) and $R<>0) {$Rtwo=0;}
if (($S2==$MAX or $S2==$MAX2 or $S2==$MAX3) and $R<>1) {$Rtwo=1;}
if (($S3==$MAX or $S3==$MAX2 or $S3==$MAX3) and $R<>2) {$Rtwo=2;}
if (($S4==$MAX or $S4==$MAX2 or $S4==$MAX3) and $R<>3) {$Rtwo=3;}
if (($S5==$MAX or $S5==$MAX2 or $S5==$MAX3) and $R<>4) {$Rtwo=4;}
if (($S6==$MAX or $S6==$MAX2 or $S6==$MAX3) and $R<>5) {$Rtwo=5;}
if (($S7==$MAX or $S7==$MAX2 or $S7==$MAX3) and $R<>6) {$Rtwo=6;}
if (($S8==$MAX or $S8==$MAX2 or $S8==$MAX3) and $R<>7) {$Rtwo=7;}
if (($S9==$MAX or $S9==$MAX2 or $S9==$MAX3) and $R<>8) {$Rtwo=8;}
if (($S10==$MAX or $S10==$MAX2 or $S10==$MAX3) and $R<>9) {$Rtwo=9;}
if (($S11==$MAX or $S11==$MAX2 or $S11==$MAX3) and $R<>10) {$Rtwo=10;}
if (($S12==$MAX or $S12==$MAX2 or $S12==$MAX3) and $R<>11) {$Rtwo=11;}
if (($S13==$MAX or $S13==$MAX2 or $S13==$MAX3) and $R<>12) {$Rtwo=12;}
if (($S14==$MAX or $S14==$MAX2 or $S14==$MAX3) and $R<>13) {$Rtwo=13;}
if (($S15==$MAX or $S15==$MAX2 or $S15==$MAX3) and $R<>14) {$Rtwo=14;}
if (($S16==$MAX or $S16==$MAX2 or $S16==$MAX3) and $R<>15) {$Rtwo=15;}
if (($S17==$MAX or $S17==$MAX2 or $S17==$MAX3) and $R<>16) {$Rtwo=16;}
if (($S18==$MAX or $S18==$MAX2 or $S18==$MAX3) and $R<>17) {$Rtwo=17;}
if (($S19==$MAX or $S19==$MAX2 or $S19==$MAX3) and $R<>18) {$Rtwo=18;}
if (($S20==$MAX or $S20==$MAX2 or $S20==$MAX3) and $R<>19) {$Rtwo=19;}
if (($S21==$MAX or $S21==$MAX2 or $S21==$MAX3) and $R<>20) {$Rtwo=20;}
if (($S22==$MAX or $S22==$MAX2 or $S22==$MAX3) and $R<>21) {$Rtwo=21;}
if (($S1==$MAX or $S1==$MAX2 or $S1==$MAX3) and $R<>0 and $Rtwo<>0) {$Rtree=0;}
if (($S2==$MAX or $S2==$MAX2 or $S2==$MAX3) and $R<>1 and $Rtwo<>1) {$Rtree=1;}
if (($S3==$MAX or $S3==$MAX2 or $S3==$MAX3) and $R<>2 and $Rtwo<>2) {$Rtree=2;}
if (($S4==$MAX or $S4==$MAX2 or $S4==$MAX3) and $R<>3 and $Rtwo<>3) {$Rtree=3;}
if (($S5==$MAX or $S5==$MAX2 or $S5==$MAX3) and $R<>4 and $Rtwo<>4) {$Rtree=4;}
if (($S6==$MAX or $S6==$MAX2 or $S6==$MAX3) and $R<>5 and $Rtwo<>5) {$Rtree=5;}
if (($S7==$MAX or $S7==$MAX2 or $S7==$MAX3) and $R<>6 and $Rtwo<>6) {$Rtree=6;}
if (($S8==$MAX or $S8==$MAX2 or $S8==$MAX3) and $R<>7 and $Rtwo<>7) {$Rtree=7;}
if (($S9==$MAX or $S9==$MAX2 or $S9==$MAX3) and $R<>8 and $Rtwo<>8) {$Rtree=8;}
if (($S10==$MAX or $S10==$MAX2 or $S10==$MAX3) and $R<>9 and $Rtwo<>9) {$Rtree=9;}
if (($S11==$MAX or $S11==$MAX2 or $S11==$MAX3) and $R<>10 and $Rtwo<>10) {$Rtree=10;}
if (($S12==$MAX or $S12==$MAX2 or $S12==$MAX3) and $R<>11 and $Rtwo<>11) {$Rtree=11;}
if (($S13==$MAX or $S13==$MAX2 or $S13==$MAX3) and $R<>12 and $Rtwo<>12) {$Rtree=12;}
if (($S14==$MAX or $S14==$MAX2 or $S14==$MAX3) and $R<>13 and $Rtwo<>13) {$Rtree=13;}
if (($S15==$MAX or $S15==$MAX2 or $S15==$MAX3) and $R<>14 and $Rtwo<>14) {$Rtree=14;}
if (($S16==$MAX or $S16==$MAX2 or $S16==$MAX3) and $R<>15 and $Rtwo<>15) {$Rtree=15;}
if (($S17==$MAX or $S17==$MAX2 or $S17==$MAX3) and $R<>16 and $Rtwo<>16) {$Rtree=16;}
if (($S18==$MAX or $S18==$MAX2 or $S18==$MAX3) and $R<>17 and $Rtwo<>17) {$Rtree=17;}
if (($S19==$MAX or $S19==$MAX2 or $S19==$MAX3) and $R<>18 and $Rtwo<>18) {$Rtree=18;}
if (($S20==$MAX or $S20==$MAX2 or $S20==$MAX3) and $R<>19 and $Rtwo<>19) {$Rtree=19;}
if (($S21==$MAX or $S21==$MAX2 or $S21==$MAX3) and $R<>20 and $Rtwo<>20) {$Rtree=20;}
if (($S22==$MAX or $S22==$MAX2 or $S22==$MAX3) and $R<>21 and $Rtwo<>21) {$Rtree=21;}
Переменные $S1-$S16, $MAX,$MAX2 и $MAX3 имеются. Переменная $R так же имеется. Почему переменные $Rtwo и $Rtree не получают соответствующих значений и определяются как пустые?
Добавить комментарий