How to resolve the algorithm Narcissist step by step in the REXX programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Narcissist step by step in the REXX programming language

Table of Contents

Problem Statement

Quoting from the Esolangs wiki page: For concreteness, in this task we shall assume that symbol = character. The narcissist should be able to cope with any finite input, whatever its length. Any form of output is allowed, as long as the program always halts, and "accept", "reject" and "not yet finished" are distinguishable.

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Narcissist step by step in the REXX programming language

Source code in the rexx programming language

/*REXX*/ say arg(1)=sourceline(1)


/*REXX*/ say word('reject accept',1+(arg(1)=sourceline(1)))


  

You may also check:How to resolve the algorithm Zhang-Suen thinning algorithm step by step in the Kotlin programming language
You may also check:How to resolve the algorithm A+B step by step in the AppleScript programming language
You may also check:How to resolve the algorithm Dutch national flag problem step by step in the 11l programming language
You may also check:How to resolve the algorithm Reverse a string step by step in the MUMPS programming language
You may also check:How to resolve the algorithm Loops/Foreach step by step in the MiniScript programming language