How to resolve the algorithm Colour bars/Display step by step in the Plain English programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Colour bars/Display step by step in the Plain English programming language
Table of Contents
Problem Statement
Display a series of vertical color bars across the width of the display. The color bars should either use:
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Colour bars/Display step by step in the Plain English programming language
Source code in the plain programming language
To run:
Start up.
Clear the screen.
Divide the screen width by 8 giving a bar width.
Make a bar with 0 and 0 and the bar width and the screen's bottom.
Draw the color bars using the bar.
Refresh the screen.
Wait for the escape key.
Shut down.
To divide the screen width by a number giving a width:
Put the screen's right into the width.
Divide the width by the number.
A bar is a box.
To draw a bar using a color and move it over:
Draw and fill the bar with the color.
Move the bar right the bar's width.
To draw the color bars using a bar:
Draw the bar using the black color and move it over.
Draw the bar using the red color and move it over.
Draw the bar using the green color and move it over.
Draw the bar using the blue color and move it over.
Draw the bar using the magenta color and move it over.
Draw the bar using the cyan color and move it over.
Draw the bar using the yellow color and move it over.
Draw and fill the bar using the white color.
You may also check:How to resolve the algorithm 99 bottles of beer step by step in the Plain English programming language
You may also check:How to resolve the algorithm Factorial step by step in the Plain English programming language
You may also check:How to resolve the algorithm Middle three digits step by step in the Plain English programming language
You may also check:How to resolve the algorithm Variadic function step by step in the Plain English programming language
You may also check:How to resolve the algorithm FizzBuzz step by step in the Plain English programming language