# Reads a single-digit number n, then prints factorial(n) '*' chars. # To easily check the value, you can pipe the output into `wc -c`, like so: # `echo 5 | ./factorial.out | wc -c` # ^ Should print 120 0 { +++ +++ [> ++++ ++++ < -] > : } s { ; > ; [- < - >] < : } r { 0 , : s } m { ; > ; < [->[->+>+<<]>[-<+>]<<]>[-]>>[-<<<+>>>]<<< : } f { ; > + < [: > : m ; < -] > : } * { +++ +++ + [> +++ +++ < -] > : } *; > rf ; [ < . > - ]