Linux
...............
Линикс
var a, b, h: integer;
begin
read(a, b, h);
write((a+b)/2*h);
end.
#include<iostream>
using namespace std;
int main()
{
long long N, M;
cout << "N = ", cin >> N;
M = N;
int Max = 0;
while(M > 0)
{
if (Max < M % 10) Max = M % 10;
M /= 10;
}
M = (N / 10)*10 + Max;
cout << "M = " << M;
return 0;
}