Чему будет равно значение переменной c в результате выполнения фрагмента программы
a:=1257; c:=0;
while a>0 do begin
if a mod 2<>0 then b:=a mod 10; c:=c+b;
a:=a div 10; end;
1) 5; 2) 13; 3) 16; 4) 18.
Ответ
Автор - AwePlaxa
var a,b,c:integer; begin a:=1257; c:=0; while (a>0) do begin if (a mod 2 <> 0) then b:= a mod 10; c:=c+b; a:=a div 10; end; writeln(c); end.