Program vj;
var x,a,b,c,h:integer;
begin
writeln('трёхзначное число');
readln(x);
a:=x div 100;
b:=x div 10 mod 10;
c:=x mod 10;
h:=a+b+c;
writeln(' Сумма цифр этого трёхзначного числа=',h)
end.
Var
y, x: real;
begin
read(x);
if (x > -20) and (x < -10) then
y := x * x * x * x
else if (x > -10) and (x < -20) then
y := abs(x)
else if ((x > 0) and (x < 20)) or ((x > 30) and (x < 70)) then
y := 45
else if ((x > 80) and (x < 100)) or ((x > 110) and (x < 140)) or (x > 180) then
y := abs(x - 4)
else
y := abs(x + 2);
writeln(x, ' ', y);
end.
Var
m,n,d:integer;
begin
Read(m,n);
d:=m mod 10 - n mod 10;
if d<0 then Writeln('У 1-го числа разряд единиц меньше')
else
if d>0 then Writeln('У 2-го числа разряд единиц меньше')
else Writeln('У обоих чисел разряды единиуц равны')
end.
#include <iostream>
using namespace std;
int main() { int X, B; cin >> X >> B; int fclass = X / 4, sclass = X - fclass; cout << fclass * B + sclass * B / 2; return 0;}