Enter n numbers from the keyboard. Find the sum and the number of three-digit and odd numbers. Pascal

program zz1;
var a, k, n, i, s: integer; // set variables of integer type
begin
write (‘enter n’); // enter the number of numbers from the keyboard
read (n);
for i: = 1 to n do // organize a loop for n repetitions
begin
read (a); // enter the number
if (a> 99) and (a <1000) and (a mod 2 = 1) then begin k: = k + 1; s: = s + a; end; // check if the number is three-digit and odd, then count it and add it to the sum
end;
write (‘the number of three-digit and odd =’, k, ‘their sum =’, s); // display the 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.