nasharasssha :
Ломал голову долго , переписывал по многу раз, но всё в пустую , либо упорно выдаёт 0;1 либо максимальное число в данной системе счисления
вот честь из программы delfphi 7
- p:=0;
begin
if (us=0) and (comp=1)
then p:=p+1;
if (us=1) and (comp=2)
then p:=p+1;
if (us=2) and (comp=0)
then p:=p+1;
if (us=0) and (comp=2)
then c:=c+1;
if (us=1) and (comp=0)
then c:=c+1;
if (us=2) and (comp=1)
then c:=c+1;
if (us=0) and (comp=0)
then p:=p ;
if (us=1) and (comp=1)
then p:=p ;
if (us=2) and (comp=2)
then p:=p ;
if (us=0) and (comp=0)
then c:=c ;
if (us=1) and (comp=1)
then c:=c ;
if (us=2) and (comp=2)
then c:=c ;
end;