Паскаль:
uses crt; var a, b, c, code,i, k : integer; st: string; beginwrite ('N = '); readln (a);write ('B =');readln (b); str (a, st); for i:= 1 to length (st) do begin val (st[i],c, code); if c>b then k:= k+1; end; writeln (k); readkey; end.
Паскаль:
uses crt;
var
a, b, c, code,i, k : integer;
st: string;
begin
write ('N = '); readln (a);
write ('B =');readln (b);
str (a, st);
for i:= 1 to length (st) do begin
val (st[i],c, code);
if c>b then k:= k+1; end;
writeln (k);
readkey;
end.