Меньше в доту катай, все знать будешь :) 1) uses crt; var s,s1,s2,s3,r1,r2:real; begin writeln ('Введите радиус первого (маленького) круга:'); read (r1); writeln ('Введите радиус второго (Большего, чем первый) круга:'); read (r2); //pi - 3.14 s:=3.14*r1*r2 ; writeln (s); //s1 - Площадь первого круга, s2 - второго, s3 - кольца s1:=3.14*sqr(r1); s2:=3.14*sqr(r2); if (s1=0) or (s2=0) then writeln ('Одна из площадей равна нулю') else begin s3:=s2-s1 ; writeln (s3); end end.
2) uses crt; var x,y,x1,y1 :integer; begin writeln ('Введите целое значение x:'); // В программе используются только целые числа !! read (x); if (x-1)<0 then y:=4 else y:=3; writeln (y); end.
3)uses crt; var a,b,c:real ; begin writeln ('Последовательно введите 3 числа :'); read (a,b,c); if (a<>b) and (b<>c) and (a<>c) then writeln ('Числа не равны') else if (a=b) and (b=c) and (a=c) then writeln ('Числа все равны между собой') else if (a=b) and (b<>c) then writeln (c) else if (a=c) and (c<>b) then writeln (b) else if (b=c) and (c<>a) then writeln (a) end.
P.s. Писал на Pascal ABC. Блок-схему сделаешь сам, она не сложная. Удачи, инвакир :D
Объяснение:
Задание 1
program bukva;
const R=[' ','.',',',';',':','?','!','-']; // разделители
var
s,bukv:string;
i,kol,len:integer;
procedure UpCaseRus(var s:string);
{русские в верхний регистр}
var i:integer;
begin
for i:=1 to length(s) do
if s[i] in ['а'..'п'] then s[i]:=chr(ord(s[i])-32)
else if s[i] in ['р'..'я'] then s[i]:=chr(ord(s[i])-80)
else if s[i]='ё' then s[i]:='Ё';
end;
begin
readln(s);
readln(bukv);
UpCaseRus(s);
UpCaseRus(bukv);
For i:=length(s) downto 2 do
if ((s[i] in R) and (s[i-1] in R)) then delete(s,i,1);
len:=length(s);
kol:=0;
for i:=len downto 1 do
begin
if s[i] in R then
if s[i+1]=bukv then kol:=kol+1;
end;
if s[1]=bukv then kol:=kol+1;
writeln('Слов на букву '+bukv+' ',kol);
readln;
end.
Задание 2
const r=[' ','.',',',';',':','?','!','-'];
var
s:string;
i,kol,d:integer;
begin
readln(s);
len:=length(s);
kol:=0; d:=0;
For i:=length(s) downto 2 do
if ((s[i] in r) and (s[i-1] in r)) then delete(s,i,1);
for i:=1 to length(s) do
begin
if s[i] in r then kol:=kol+1
else if (s[i] in ['0'..'9']) then d:=d+1;
end;
writeln('Слов всего ',kol+1);
writeln('Цифр в тексте ',d);
readln;
end.