Write a program in pascal that calculates the area of a triangle using the formula 1 / 2LH (L basis H height)

program zz1;

var h, l, s: real; // set variables of non-integer type

begin

write (‘enter the given base of the triangle’); // enter any number from the keyboard

read (l);

write (‘enter the given triangle height’); // enter any number from the keyboard

read (h);

s: = (l * h) / 2; // calculate the area of the triangle using the given formula

writeln (‘area of a triangle =’, s: 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.