Write a program that reads a three-digit number and finds whether the sum of the digits of this number

Write a program that reads a three-digit number and finds whether the sum of the digits of this number is greater than or less than 10.

The solution of the problem:
The code is written in PascalABC.NET program.
var a, one, two, three, sum: integer;
begin
write (‘Enter a three-digit number:’);
readln (a);
one: = a div 100;
two: = (a mod 100) div 10;
three: = a-one * 100-two * 10;
sum: = one + two + three;
if sum = 10 then writeln (‘Answer: the sum of the digits of the number is 10’) // Condition: the sum of the digits is 10.
else begin
if sum <10 then writeln (‘Answer: the sum of the digits of the number is less than 10’) // Condition: the sum of the digits <10.
else writeln (‘Answer: the sum of the digits of the number is more than 10’); // Condition: sum of digits> 10.
end;
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.