Skip to main content
Commonmark migration
Source Link

#Perl, 122 bytes

Perl, 122 bytes

$k=<>;for(my $i=0;$i++<10;){$s="-"."$i"x($k/10-$i+1);$p=length $s;$l=$l>$p?$l:$p;printf "%${l}s%s\n",$s,scalar reverse $s}

#Perl, 122 bytes

$k=<>;for(my $i=0;$i++<10;){$s="-"."$i"x($k/10-$i+1);$p=length $s;$l=$l>$p?$l:$p;printf "%${l}s%s\n",$s,scalar reverse $s}

Perl, 122 bytes

$k=<>;for(my $i=0;$i++<10;){$s="-"."$i"x($k/10-$i+1);$p=length $s;$l=$l>$p?$l:$p;printf "%${l}s%s\n",$s,scalar reverse $s}
Source Link

#Perl, 122 bytes

$k=<>;for(my $i=0;$i++<10;){$s="-"."$i"x($k/10-$i+1);$p=length $s;$l=$l>$p?$l:$p;printf "%${l}s%s\n",$s,scalar reverse $s}