program test;var number: integer;begin write('Enter the number: '); readln(number); case number mod 10 of 1: writeln(number, ' рубль'); 2, 3, 4: writeln(number, ' рубля'); else writeln(number, ' рублей') end; readln;end.
program test;
var number: integer;
begin
write('Enter the number: ');
readln(number);
case number mod 10 of
1: writeln(number, ' рубль');
2, 3, 4: writeln(number, ' рубля');
else
writeln(number, ' рублей')
end;
readln;
end.