Restricted chicken

From Esolang
Jump to navigation Jump to search

Restricted chicken is a derivative of chicken, created by User:None1

Command

There is only one command: chicken, which prints "chicken" (without quotes) , other commands are considered invalid.

Example Programs

Quine 1

chicken

Quine 2

chicken
chicken

Any valid program is a quine.

Interpreters

Python

while 1:
    try:
        code=input()
    except:
        break
    if code!='chicken':
        raise ValueError('invalid program')
    print('chicken')

C++

#include<iostream>
#include<string>
#include<exception>
using namespace std;
int main(){
    string s;
    while(getline(cin,s)){
        if(s!="chicken"){
            throw new exception;
        }
        cout<<"chicken"<<endl;
    }
    return 0;
}