Не может формула №2, так как в ней заданы относительные ссылки и при копировании формулы в ячейку Е4 она будет выглядеть так:
=3*H6+I9, что не соответствует условию
Const
n=2;
var
a:array[1..n,1..n]of integer;
i,j,s,max,imax:integer;
begin
for i:=1 to n do
begin
s:=0;
for j:=1 to n do
begin
readln(a[i,j]);
s:=s+a[i,j];
end;
if s>max then
begin
max:=s;
imax:=i;
end;
end;
writeln('i: ',imax,' s= ',max);
end.
var
f: Text;
i: integer;
c: char;
begin
Assign(f, 'in.txt');
Reset(f);
while not (EOF(f)) do
begin
read(f, c);
writeln(c, ' ', ord(c));
end;
writeln('===================');
reset(f);
while not (EOF(f)) do <em>//Второй способ, перебором получить код</em>
begin
i := 0;
read(f, c);
repeat
i := i + 1;
until (chr(i) = c);
writeln(c, ' ', i);
end;
end.
C++:
#include < iostream >
using namespace std;
int a[10];
int main() {
for(int i = 0; i < 10; ++i){
cin >> a[i];
}
for(int i = 0; i < 10; ++i){
if(!(a[i]%2)) a[i] *= 2;
if((i+1)%2) a[i] /= a[0];
}
for(int i = 0; i < 10; ++i){
cout << a[i];
}
return 0;
}
(уберите пробелы до и после iostream)