Make a program that detects an even number or not? The program generates a random number

Make a program that detects an even number or not? The program generates a random number using Random and outputs the number itself and the phrase “even” or “odd”.

program zz1;
var n: integer; // set a variable of integer type
begin
n: = random (21); // write a random number from zero to twenty to the variable
writeln (n); // display the resulting random number on the screen
if n mod 2 = 0 then write (‘even’) else write (‘odd’); // check the condition, if the random number is divisible by two without a remainder, then output the answer ‘even’, if it is not divisible by two without a remainder, then output the answer ‘odd’
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.