Write a program in Pascal. Find the sum of 10 odd numbers.

program zz1;

var k, s, i: integer; // set variables of integer type


k: = 0; // set the initial value for the number of odd numbers

i: = 1; // set the initial value for the loop parameter

while k <10 do // organize a loop until the number of odd numbers reaches ten


if i mod 2 = 1 // check the condition, if the number is odd, then add it to the sum and calculate

then begin k: = k + 1; s: = s + i; end;

i: = i + 1; // increase the loop parameter by one


write (‘sum of ten odd numbers =’, s); // display the answer


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.