Программа на паскале: var a,m,k:integer; begin write('a = '); readln(a); write('m = '); readln(m); k:=0; if a div 1000 = m then k:=k+1; if a div 100 mod 10 = m then k:=k+1; if a mod 100 div 10 = m then k:=k+1; if a mod 10 = m then k:=k+1; writeln('k = ',k); end.