Find the side of a rectangle, knowing its perimeter and one side, write down the problem with the solution
August 7, 2021 | education
| Find the side of a rectangle, knowing its perimeter and one side, write down the problem with the solution in Pascal programming languages.
program zz1;
var a, h, r: real; // set variables of non-integer type
begin
write (‘enter the known side of the rectangle’); // enter a number from the keyboard
read (a);
write (‘enter the perimeter of the rectangle’); // enter a number from the keyboard
read (h);
r: = (h / 2) – a; // calculate the second side of the rectangle using the perimeter formula
write (‘second side of rectangle =’, r: 5: 2); // display the answer in the format of five characters for the whole number and two characters after the dot
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.