Write a program that asks the user for a number, but not more than five digits, and displays a message

Write a program that asks the user for a number, but not more than five digits, and displays a message on the screen about how many digits are in the given number.

program kolichestvo_cifr;

var n, x: integer;

begin

writeln (‘Enter a number from the keyboard’);

readln (n);

if x> 99999 then writeln (‘The number is greater than 5 digits’) else begin

while n> 0 do begin

n: = n mod 10;

x: = x + 1;

end;

end;

writeln (‘In number’, x, ‘digits’);

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.