Div - целая часть, полученная от деления
mod - остаток, полученный от деления
<span>С=0???, если нет, то пересчитай
А: =624897
В: =а div 1000 =624
C: =( B+ C ) mod 100 =(624+0) mod 100=2
D:=(B+C) mod 10 =(624+2) mod 10=6
F:=С*D=2*6=12</span>
Python 3.7.0
===========================
x = int(input("x = "))
if (x < 5):
y = (4 * x * x + 1) / (x - 5)
elif (x >= 5):
y = 3 * x * x - 2
print(y)
Код PascalABC.NET 3.2:
Var S:string;
i,k:integer;
Begin
Write('Введите строку: ');ReadLn(S);
LowerCase(S);
k:=0;
For i:= 1 to S.Length-2 do
if S[i] = 'д' then
if S[i+1] = 'о' then
if S[i+2] = 'м' then
k:=k+1;
WriteLn(k)
End.
Var
S:string;
i,d1,d2,d3:integer;
Begin
WriteLn('Введите строку:');
ReadLn(S);
i:=0;
Repeat
i+=1
Until S[i] = ' ';
d1:=i-1;
Repeat
i+=1
Until S[i] = ' ';
d2:=i-d1-2;
Repeat
i+=1
Until i = S.Length;
d3:=i-d2-d1-2;
if d3 < d1 then d1:=d3;
if d2 < d1 then d1:=d2;
WriteLn(d1)
End.
59 * 16 = 944 бита!"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!