# Looping counter

A **looping counter** counts up to infinity or a specific number (or possibly down to a specific number or negative infinity). Counting from 99 to 0 can be used as a simpler alternative of the 99 bottles of beer program to prove that a language is usable for computation.

The program exhausts unbounded memory over infinite time. It prints each value as it counts, and it exhausts infinite states in infinite time. The program is essentially an unbounded unary counter.

The output of a looping counter is as follows:

* ** *** **** ***** ****** ******* ******** ********* ********** *********** ************

With each iteration, the memory used grows.

## Examples

### Befunge

1:v,*25< : : v_$1+ ^ " *: "- ,1 >^

### Brainfuck

>>++++++++++[[->+<<++++>]<++[<]>[.>]>.]

### Stack-based

VAR x VAR y VAR z VAR one S x 1 S one 1 S z 10 C x y P "*" SU y one JB y 2 OC z JB one 5

### UTC+8

无限地（重复循环次数次输出“*”然后输出字符10）。

Two examples are available on the page ///, printing rows of increasingly many asterisks with each run.

The looping counter was also used as the first demonstration that Black was possibly Turing-complete. (Although a looping counter does not prove Turing-completeness in its own right, it helps to demonstrate how a language is capable of storing and retrieving arbitrary amounts of data, which is often one of the hardest aspects of Turing-completeness to discover within a language.)