How to resolve the algorithm Even or odd step by step in the TUSCRIPT programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Even or odd step by step in the TUSCRIPT programming language
Table of Contents
Problem Statement
Test whether an integer is even or odd. There is more than one way to solve this task:
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Even or odd step by step in the TUSCRIPT programming language
Source code in the tuscript programming language
$$ MODE TUSCRIPT
LOOP n=-5,5
x=MOD(n,2)
SELECT x
CASE 0
PRINT n," is even"
DEFAULT
PRINT n," is odd"
ENDSELECT
ENDLOOP
You may also check:How to resolve the algorithm Empty program step by step in the Swift programming language
You may also check:How to resolve the algorithm Scope modifiers step by step in the Phix programming language
You may also check:How to resolve the algorithm Ultra useful primes step by step in the Wren programming language
You may also check:How to resolve the algorithm Statistics/Basic step by step in the MiniScript programming language
You may also check:How to resolve the algorithm Real constants and functions step by step in the Clojure programming language