Cи: ... int sum = 0, res = 0; ... for (i = 0; i < N; i++) if (A[i] % 5 == 0 && A[i] % 7 != 0) sum += A[i], res++; printf("Sum = %i; Number = %i\n", sum, res); ...
C++: ... int sum = 0, res = 0;
for (int i = 0; i < N; i++) if (A[i] % 5 == 0 && A[i] % 7 != 0) sum += A[i], res++;
std::cout << "Sum = " << sum << "Numbers = " << res << std::endl; ...
PASCAL: ... var sum, res : integer; ... sum := 0; res := 0;
for i := 1 to N begin if (A[i] mod 5 = 0) and (A[i] mod 7 <> 0) begin sum := sum + A[i]; res := res + 1; end; end; ...
...
int sum = 0, res = 0;
...
for (i = 0; i < N; i++)
if (A[i] % 5 == 0 && A[i] % 7 != 0)
sum += A[i], res++;
printf("Sum = %i; Number = %i\n", sum, res);
...
C++:
...
int sum = 0, res = 0;
for (int i = 0; i < N; i++)
if (A[i] % 5 == 0 && A[i] % 7 != 0)
sum += A[i], res++;
std::cout << "Sum = " << sum << "Numbers = " << res << std::endl;
...
PASCAL:
...
var sum, res : integer;
...
sum := 0;
res := 0;
for i := 1 to N begin
if (A[i] mod 5 = 0) and (A[i] mod 7 <> 0) begin
sum := sum + A[i];
res := res + 1;
end;
end;
...