program SumDivisibleByFour;varnum, sum, count, i: integer;beginsum := 0;count := 0;
writeln('Enter the number of elements:');readln(num);
for i := 1 to num dobeginwriteln('Enter element ', i, ':');readln(num);
end;
writeln('Sum of numbers divisible by 4 and ending with 4: ', sum);end.
program SumDivisibleByFour;
var
num, sum, count, i: integer;
begin
sum := 0;
count := 0;
writeln('Enter the number of elements:');
readln(num);
for i := 1 to num do
if (num mod 4 = 0) and (num mod 10 = 4) thenbegin
writeln('Enter element ', i, ':');
readln(num);
begin
sum := sum + num;
count := count + 1;
end;
end;
writeln('Sum of numbers divisible by 4 and ending with 4: ', sum);
end.