using System;
class Program
{
static void Main()
{
bool flag;
Console.Write("A: ");
int A = int.Parse(Console.ReadLine());
Console.Write("B: ");
int B = int.Parse(Console.ReadLine());
Console.Write("C: ");
int C = int.Parse(Console.ReadLine());
if (((B > A) && (B < C)) || ((B > C) && (B < A)))
flag = true;
else
flag = false;
if (flag)
Console.WriteLine("Існита! Число В знаходиться між числами А та С!");
else
Console.WriteLine("Хибність! Число В знаходиться між числами А та С ");
Console.ReadLine();
}
}
ответ:
uses crt;
var a: array[1..20,1..20] of real;
n,m,i,j: integer;
s: real;
begin
clrscr; randomize;
write('введите кол-во строк: '); readln(n);
write('введите кол-во столбцов: '); readln(m);
for i: =1 to n do
begin
for j: =1 to m do
begin
a[i,j]: =random(100)/10;
write(a[i,j]: 4: 1);
end;
writeln;
end;
for i: =1 to n do
begin
s: =0;
for j: =1 to m do
s: =s+a[i,j];
writeln('сумма ',i,'-ой строки: ',s: 0: 1);
end;
for j: =1 to m do
begin
s: =0;
for i: =1 to n do
s: =s+a[i,j];
writeln('сумма ',j,'-ого столбца: ',s: 0: 1);
end;
for j: =1 to m do
begin
s: =0;
if j mod 2 = 0 then
begin
for i: =1 to n do
s: =s+a[i,j];
writeln('среднее арифметическое ',j,'-ого столбца: ',s/m: 0: 1);
end;
end;
readln;
end.
объяснение: