Title | IMC-Lab3 - adsfsdavsaregweebrby jny jrgw sdanflk klsdaf skladjf ksadjflkwjelsjflk sdjf |
---|---|
Course | Mathematics for ROS |
Institution | Faculdade de Telêmaco Borba |
Pages | 3 |
File Size | 283.8 KB |
File Type | |
Total Downloads | 48 |
Total Views | 119 |
adsfsdavsaregweebrby jny jrgw sdanflk klsdaf skladjf ksadjflkwjelsjflk sdjf sdajflkjlkasfjkdjskalfjasdkljlksdaflk sdjf sdjfksdjf lkjsdk fjsjfklashgslk skadjfk slkdjfk kj...
Fachhochschule Würzburg-Schweinfurt Wolfgang Spieß & Norbert Strobel
Computer Lab 3 Nested For Loops and ASCII Code
What is this exercise all about? The topic of this computer lab is to take another look at screen output as well as nested for loops using C++. It also involves the ASCII table. • Set up an empty Visual Studio C++ Project named: IMCLab3. • Place this project onto your desktop! • Add an empty C++ source file to the project. It may be called IMCLab3.cpp • Enter the C++ code, compile it, and fix errors. • Proceed step by step, i.e., experiment even. Then go from there.
16 x 16 ASCII Table (from http://www.os2voice.org/VNL/past_issues_DE/VNL1006H/feature_2.html)
Vers. 1.0 12.12.2017 W.Sp & N. Strobel IBMC1_Lab_3
Fachhochschule Würzburg-Schweinfurt Wolfgang Spieß & Norbert Strobel Write a C++ program which output the ASCII code table on the screen. The ASCII table can be expressed as a table that has 16 rows and 16 columns (see above). However, there are special characters in the first two rows that create problems when printed such as line breaks or line feeds. This is why you should start printing with the third row (see below). In other words, the last 14 rows each having 16 columns are to be printed to screen. To make the result look nice, please put a frame around the ASCII table entries as illustrated below.
1.) Please output the following information first: Lab3 WS17 IBMC1 Author: First Name Last Name 2.) Next, print out the ASCII table to the screen using nested for loops.
Notes: The frame is comprised of special characters. In fact, they can be found in ASCII table displayed. Macros have been defined to simplify their use. // ASCII American Information Standard Code (for) Information Interchange #define VL (char)0xB3 // vertical line #define HL (char)0xC4 // horizontal line #define CUL (char)0xDA // corner upper left #define CLL (char)0xC0 // corner lower left #define CUR (char)0xBF // corner upper right #define CLR (char)0xD9 // corner lower right
Please copy these macros into your source code between the include statements and before the start of the main function, int main(void). To, for example, print out the upper left corner in a console window, add, for example, the following statement to your code std::cout...