不是VIP会员,不能显示答案

题目解答

题目:
program test_2015_4;
const
s='0123456789ABCDEPGHIJKLMN0PQRSTUVWXYZ';
base = 16;
var
i , j , n , tmp : interger ;
a : array [1.. 100] of char;
begin
readln ( n );
i := 0 ;
while n > 0 do
begin
inc ( i );
tmp : = n mod base ;
a[i] : = s[tmp + 1];
n : = n div base
end ;
if i = 0 then
write (0)
else
for j : = i downto 1 do
write ( a[j]);
writeln;
end.
输入: 2015
输出:7DF
考点:
分析:
解答:
评论:
老师: