Var s:string;
i,j,l,min:byte;
begin
min:=255;
readln(s);
if s[1]='a' then j:=j+1;
s[length(s)+1]:=' ';
for i:=1 to length(s)+1 do
begin
if (s[i]='a') and (s[i-1]=' ') then j:=j+1;
if s[i]<>' ' then l:=l+1 else
begin
if s[i-1]<>' ' then
if min>l then min:=l; l:=0;
end;
end;
writeln('a) Slow kotorie nachinayutsa s "a" - ',j);
writeln('b) Dlina samogo korotkogo slova - ',min);
<span>end.</span>
Ответ:
using System;
namespace ConsoleApp18
{
class Program
{
static void Main(string[] args)
{
string s = Console.ReadLine();
int n = int.Parse(s.Split(' ')[0]), m = int.Parse(s.Split(' ')[1]), sum = 0;
int[,] a = new int[n,m];
for (int i = 0; i < n; i++)
{
s = Console.ReadLine();
for (int j = 0; j < m; j++)
{
a[i, j] = int.Parse(s.Split(' ')[j]);
sum += a[i, j];
}
}
Console.WriteLine(sum);
Console.ReadKey();
}
}
}
Объяснение:
Var i: integer;
begin
for i:=10 to 99 do
begin
if (i div 10 - i mod 10 > 3 ) then
print(i);
end
end.
var
a:array[1..10] of integer;
i:integer;
begin
for i:=1 to 10 do
read(a[i]);
for i:=1 to 10 do
if a[i]<0 then a[i]=abs(a[i]);
for i:=1 to 10 do
write(a[i]);
end.
Объяснение:
42,95,75,54
*мне не хватает необходимых символов, чтобы отправить ответ, поэтому я написал это