BIG Numbers

1

Please login or register to vote for this query.

(click on this box to dismiss)

Physical Fitness Meta

Q&A about the site for physical fitness professionals, athletes, trainers, and those providing health-related needs

set nocount on declare @n varchar(20) = ##n:string##
if isnumeric(@n)=0 or len(@n)>14 begin print 'Enter a number, up to 14 digits, and try again.' return end
create table #n(n tinyint,s nvarchar(150)) insert into #n(n,s)values(0,'..·····....··...··..··.....··.··.....··.··.....··..··...··....·····...'),(1,'...··....····......··......··......··......··....······.'),(2,'.·······..··.....··........··..·······..··........··........·········.'),(3,'.·······..··.....··........··..·······.........··.··.....··..·······..'),(4,'··........··....··..··....··..··....··..·········.......··........··..'),(5,'········.··.......··.......·······........··.··....··..······..'),(6,'.·······..··.....··.··........········..··.....··.··.....··..·······..'),(7,'········.··....··.....··......··......··.......··.......··.....'),(8,'.·······..··.....··.··.....··..·······..··.....··.··.....··..·······..'),(9,'.·······..··.....··.··.....··..········........··.··.....··..·······..')

declare @d tinyint,@c tinyint,@s nvarchar(150),@p nvarchar(max)
set @c=1 while @c<=7
  begin set @p=N''
    set @d=1 while @d<=len(@n)
    begin
      set @s=(select s from #n where n=convert(tinyint,substring(@n,@d,1)))
      set @p=@p+replace(replace(substring(@s,(@c-1)*(len(@s)/7)+1,len(@s)/7),'.',N' '),'·',N'#') --█▒░
      set @d=@d+1
    end print @p set @c=@c+1
  end
  
--n:Enter a number:"Enter a number up to 14 digits."

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results