Program job_1;
var
a,b,s,d, : integer;
begin
writeln('введите два числа ');
readln(a,b);
s:=a*b;
writeln('После умножение',s);
d:=a-b;
writeln('Вычитание',d);
end.
НА ПАСКАЛЕ
#include <iostream>
<span>#include <cstdlib>
</span><span>#include <iomanip>
</span><span>using namespace std;
</span>int const n=6;
<span>int const m=6;
</span>int main() {
<span> int a[n][m];
</span><span> int sm;
</span><span>// установка генератора случайных чисел
</span><span> srand(time(NULL));
</span><span>// генерация массива и вывод на экран
</span><span> for (int i=0; i<n; i++) {
</span> <span>for (int j=0; j<m; j++) {
</span> <span>a[i][j]=rand()%50-20;
</span><span> cout<<setw(7)<<a[i][j];
</span><span> }
</span><span> cout<<endl;
</span><span> }
</span><span>// обработка массива
</span><span> for (int i=0; i<m; i++) {
</span><span> sm=0;
</span><span> for (int j=0; j<n; j++) sm+=a[j][i];
</span><span> for (int j=0; j<n; j++)
</span><span> if (2*a[j][i]>sm) cout<<j+1<<" "<<i+1<<endl;
</span><span> }
</span><span> system("pause");
</span><span> return 0;
}</span>
-16 -2 15 4 7 3
<span> -13 16 3 16 -13 3
</span><span> 0 19 20 6 20 -18
</span><span> -19 7 1 10 -11 25
</span><span> 5 4 3 21 28 -13
</span><span> 26 -19 -7 12 -20 11
</span><span>1 1
</span><span>2 1
</span><span>3 1
</span><span>5 1
</span><span>6 1
</span><span>3 5
</span><span>5 5
</span><span>4 6
</span>
Var
n, a, s,i: integer;
begin
s := 0;
read(n);
for i := 1 to n do
begin
read(a);
if(a mod 3 = 0) then s := s + a;
end;
write(s);
end.
VVVVVVVVVVVVVV
Const nx=30; mx=30;
var r:array[1..nx,1..mx] of integer;b:array[1..mx] of integer;
i,j,n,m,k,sum,min:integer;
begin
min:=40;
randomize;
write('Введите n,m: ');readln(n,m);
writeln('Исходная матрица: ');
for j:=1 to m do begin
for i:=1 to n do begin
r[i,j]:=random(20)-10;
sum:= sum + r[i,j];end;
b[j]:=sum;sum:=0;
end;
for i:=1 to n do begin
for j:=1 to m do begin
write(r[i,j]:4);end;
writeln;end;
writeln;
for j:=1 to m do begin
write(b[j]:4);
if min > b[j] then begin
min:= b[j]; k:= j;end;
end;
writeln;writeln;
for i:=1 to n do begin
for j:=1 to m do begin
if j=k then write(r[i,j]:4);end;
writeln;end;
end.
68.27руб*7=477.89 руб стоит 7 товаров
68.27 руб стоит 1 товар