Create a Pascal program: Find the product of the digits of a given 3-digit number.
July 7, 2021 | education
| var
n, pr: integer;
begin
// Organize the input
write (‘Please enter a three-digit number’);
readln (n);
// calculate the product
pr: = (n mod 10) * ((n div 10) mod 10) * (n div 100);
// Arrange the output
writeln (‘The product of the digits of a number’, n, ‘equals’, pr);
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.