A natural three-digit number N is given. Write a program that outputs a four-digit number obtained by assigning the digit

A natural three-digit number N is given. Write a program that outputs a four-digit number obtained by assigning the digit of the digit of the units of the original number to it on the left (in the digit of thousands). Using text files input, output.

program zz1;
var
n, i, s: integer; // set variables of integer type
f1, f2: text; // set a variable of the text type to work with the file
begin
assign (f1, ‘input.txt’); // bind a variable of the text type to the file
reset (f1); // open the file for reading
assign (f2, ‘output.txt’);
rewrite (f2); // open the file for writing
read (f1, n);

s: = n mod 10; // get the last digit
n: = n + s * 1000; // assign it to a number
write (f2, n); // display the answer
close (f1); // close the file input
close (f2); // close the file output
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.