Enter a 5-digit number from the keyboard and count the product of the odd digits of the number.

program zz1;
var a, k, s: integer; // set variables of integer type
begin
write (‘enter the given five-digit number’); // enter the number from the keyboard
read (k);
a: = 1;
while k> 0 do // organize a loop while the number contains digits
begin
s: = k mod 10; // get the last digit
if s mod 2 = 1 then a: = a * s; // check the digit for odd parity and get the product
k: = k div 10; // discard it from the number
end;
writeln (‘product of odd digits of a five-digit number =’, a); // display the answer
end.



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.