Write a program that enters a four-digit number and cuts out the second digit from it (in Pascal)

program zz1;
var n, k: integer; // set variables of integer type
begin
write (‘enter a natural four-digit number’);
read (n); // enter a four-digit number from the keyboard
k: = (n mod 100) div 10; // we get the second digit, separating the last two digits from it through division by 100 with the remainder, then from the result obtained we get the first digit through division by 10 with the selection of the whole part of the result
writeln (‘The second digit of the given four-digit number =’, k); // 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.