program Project2; {$APPTYPE CONSOLE} uses SysUtils; var i,x,y,z, dwa,tri,shetire,pati:Integer; begin Writeln('student Fediya='); Readln(i); Writeln('student Sungat='); readln(x); Writeln('student Alex='); readln(y); Writeln('student Halif='); Readln(z); case i of 2: Inc(dwa); 3: Inc(tri); 4: Inc(shetire); 5: Inc(pati); end; begin case x of 2: Inc(dwa); 3: Inc(tri); 4: Inc(shetire); 5: Inc(pati); end; end; begin case y of 2: Inc(dwa); 3: Inc(tri); 4: Inc(shetire); 5: Inc(pati); end; end; begin case z of 2: Inc(dwa); 3: Inc(tri); 4: Inc(shetire); 5: Inc(pati); end; end; WriteLn(#13#10'dwa: ', dwa, #13#10'tri: ', tri, #13#10'shetire: ', shetire, #13#10'pati: ', pati); ReadLn; { TODO -oUser -cConsole Main : Insert code here }end.
1.
program pifagor;
var
a,b:real;
begin
write('Введите катеты 》 ');
read(a,b);
write('Гипотенуза 》 ',sqrt(sqr(a)+sqr(b)));
end.
2.
program temp2;
var
a:integer;
begin
write('Введите число 》 ');
read(a);
write('Последняя цифра числа 》 ',a mod 10)
end.
3.
program pifagor;
var
a:integer;
begin
write('Введите трехзначное число 》 ');
read(a);
write('Сумма цифр числа = ',a div 100+a div 10 mod 10+a mod 10);
end.
4.
A=50
B=20
A=40-30=10
10<20
C=2×10=20
5.
program kratnost;
var
x:integer;
begin
write('Введите X 》 ');
read(x);
if(x mod 5=0)
then
write('X Делится на 5')
else
write('X Не делится на 5')
end.
{$APPTYPE CONSOLE}
uses SysUtils;
var i,x,y,z, dwa,tri,shetire,pati:Integer;
begin
Writeln('student Fediya=');
Readln(i);
Writeln('student Sungat=');
readln(x);
Writeln('student Alex=');
readln(y);
Writeln('student Halif=');
Readln(z);
case i of
2: Inc(dwa);
3: Inc(tri);
4: Inc(shetire);
5: Inc(pati);
end;
begin
case x of
2: Inc(dwa);
3: Inc(tri);
4: Inc(shetire);
5: Inc(pati);
end;
end;
begin
case y of
2: Inc(dwa);
3: Inc(tri);
4: Inc(shetire);
5: Inc(pati);
end; end;
begin
case z of
2: Inc(dwa);
3: Inc(tri);
4: Inc(shetire);
5: Inc(pati);
end;
end;
WriteLn(#13#10'dwa: ', dwa, #13#10'tri: ', tri, #13#10'shetire: ', shetire, #13#10'pati: ', pati);
ReadLn;
{ TODO -oUser -cConsole Main : Insert code here }end.