How to resolve the algorithm Write language name in 3D ASCII step by step in the XPL0 programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Write language name in 3D ASCII step by step in the XPL0 programming language
Table of Contents
Problem Statement
Write/display a language's name in 3D ASCII.
(We can leave the definition of "3D ASCII" fuzzy, so long as the result is interesting or amusing, not a cheap hack to satisfy the task.)
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Write language name in 3D ASCII step by step in the XPL0 programming language
Source code in the xpl0 programming language
include c:\cxpl\codes;
proc DrawBlock(X, Y);
int X, Y;
[Cursor(X+1, Y); Text(0, "///\");
Cursor(X, Y+1); Text(0,"/// \");
Cursor(X, Y+2); Text(0,"\\\ /");
Cursor(X+1, Y+3); Text(0, "\\\/");
];
int Data, D, X, Y;
[ChOut(0, $C); \form feed, clears screen
Data:= [%1000100011110000100000001110,
%1000100010001000100000010001,
%0101000010001000100000010011,
%0010000011110000100000010101,
%0101000010000000100000011001,
%1000100010000000100000010001,
%1000100010000000111110001110];
for Y:= 0 to 6 do
[D:= Data(Y);
for X:= 0 to 27 do
[if D&1<<27 then DrawBlock(X*2+(6-Y)*2, Y*2);
D:= D<<1;
];
];
]
You may also check:How to resolve the algorithm Non-decimal radices/Output step by step in the Erlang programming language
You may also check:How to resolve the algorithm Kaprekar numbers step by step in the Prolog programming language
You may also check:How to resolve the algorithm Return multiple values step by step in the Lasso programming language
You may also check:How to resolve the algorithm Function composition step by step in the Scala programming language
You may also check:How to resolve the algorithm Binary digits step by step in the Lambdatalk programming language