Denying machine
Jump to navigation
Jump to search
A denying machine is a machine that does
- reads input
- set A to 0
- label a
- if input!=0:
- output A
- terminate program
- otherwise:
- A+=1
- goes to label a
Interpreters
><>
i:?v nl+<;
node.js
a=i=0;while(!(i=+prompt()))a++;console.log(a)