2 numbers A and B are entered from the keyboard. If A is odd, then we calculate A + B, otherwise A * B.

2 numbers A and B are entered from the keyboard. If A is odd, then we calculate A + B, otherwise A * B. The calculated result is displayed on the screen to compose a program for pascal

program zz1;
var a, b: integer; // set variables of integer type
begin
write (‘enter the first number’); // enter the first number from the keyboard
read (a);
write (‘enter the second number’); // enter the second number from the keyboard
read (b);
if (a mod 2 = 1) // check the first number for oddness, if the first number is odd, then
then write (‘the sum of two entered numbers =’, a + b) // print one answer
else write (‘product of two entered numbers =’, a * b); // print another 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.