// a, b, c - сотки, десятки и единицы соответственно
var a, b, c: interger;
var result, temp: interger;
temp := a;
if b > temp
then
temp := b;
end
if c > temp
then
temp := c;
end
// мы получили наибольшее из этих чисел
result := temp * 100;
temp := a;
if temp > b
then
if temp > c
then
if b > c
then
temp := b;
else if b < c
temp := c;
end
end
else
if temp < b
then
if temp < c
then
if b < c
then
temp := b;
else if b > c
temp := c;
end
end
end
// мы получили среднее число
result := result + temp * 10;
temp := a;
if b < temp
then
temp := b;
end
if c < temp
then
temp := c;
end
// мы получили наименьшее число
result := result + temp;
print(result);