Program red; var a,b:integer; begin b:=0; readln(a); if a<10 then begin if a mod 2=0 then b:=1; end; if (a>=10) and (a<100) then begin if ((a div 10) mod 2=0) and (a div 10 <>0) then b:=b+1; if ((a mod 10) mod 2=0) and (a mod 10 <>0) then b:=b+1; end; if (a>=100) and (a<1000) then begin if ((a div 100) mod 2=0) and (a div 100 <>0) then b:=b+1; if (((a div 10) mod 10) mod 2=0) and ((a div 10) mod 10 <>0) then b:=b+1; if ((a mod 10) mod 2=0) and (a mod 10<>0) then b:=b+1; end; writeln(b); end.
Ответить на вопрос
Поделитесь своими знаниями, ответьте на вопрос:
Drag and drop to train a 3nn model to classify iris and output the predicted probabilities on the testing data set:
var a,b:integer;
begin
b:=0;
readln(a);
if a<10 then
begin
if a mod 2=0 then b:=1;
end;
if (a>=10) and (a<100) then
begin
if ((a div 10) mod 2=0) and (a div 10 <>0) then b:=b+1;
if ((a mod 10) mod 2=0) and (a mod 10 <>0) then b:=b+1;
end;
if (a>=100) and (a<1000) then
begin
if ((a div 100) mod 2=0) and (a div 100 <>0) then b:=b+1;
if (((a div 10) mod 10) mod 2=0) and ((a div 10) mod 10 <>0) then b:=b+1;
if ((a mod 10) mod 2=0) and (a mod 10<>0) then b:=b+1;
end;
writeln(b);
end.