Exemplo n.º 1
0
        private static string stackToString(CrackingBook.Utils.Stack <string> stk)
        {
            string chunk = "";

            while (!stk.IsEmpty())
            {
                chunk += stk.Pop() + " ";
            }
            return(chunk);
        }
Exemplo n.º 2
0
        public static string convertInt(long num)
        {
            int chunkCount = 0;
            var chunk      = new CrackingBook.Utils.Stack <string>();

            if (num == 0)
            {
                return(smalls[0]);
            }
            else if (num < 0)
            {
                return($"Negative {convertInt(-1 * num)}");
            }

            while (num > 0)
            {
                chunk.Push(CovertChunk(num % 1000) + " " + bigs[chunkCount]);
                num /= 1000;
                chunkCount++;
            }

            return(stackToString(chunk));
        }