base convert by croyal

integer p,n,b
integer,dimension(99)::a
1 read*,n,b
p=1
do
   if(n<b) then
      exit
   endif
   a(p)=mod(n,b)
   p=p+1
   n=n/b
enddo
if(n>0) then
   a(p)=n
   p=p+1
endif
p=p-1
do
   if(p<1) then 
      exit
   endif
   write(*,"(i0)",advance='no')a(p)
   p=p-1
enddo
print"(a)",""
goto 1
end

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page