Introduce two arrays with different numbers of elements. Find how many elements one array is larger than another.

Let’s introduce the following designations: a – an array of n elements; a [i] – values ​​of elements of array a; b – an array of k elements; b [i] – values ​​of elements of array b; c and d – the number of elements of the arrays a and b, respectively, which will be counted during the program execution. We will use the loop operator with the for parameter. Then a program in the Pascal ABC programming language may look like this:

program zadaca1;

uses crt;

const n = 2; const k = 4;

var i, c, d: integer;

a: array [1..n] of integer;

b: array [1..k] of integer;


c: = 0; d: = 0;

for i: = 1 to n do begin

writeln (‘vvedite znachenie a [i]:’);

readln (a [i]);

c: = c + 1;


for i: = 1 to n do

write (a [i], ”);


writeln (‘c =’, c);

for i: = 1 to k do begin

writeln (‘vvedite znachenie b [i]:’);

readln (b [i]);

d: = d + 1;


for i: = 1 to k do

write (b [i], ”);


writeln (‘d =’, d);

if c> d then writeln (‘massiv a bolshe masiva b na’, c-d)

else writeln (‘massiv b bolshe masiva a na’, d-c);


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.