Student Project
2024-09-08 20:45:54 UTC
This one works as expected but there is definitely a room for
improvement. :-)
#include <iostream>
#include <vector>
using namespace std;
int main()
{
system("color 0A");
system("cls");
vector<string> obj = {
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"exclamation mark",
"quotation mark",
"number sign",
"dollar sign",
"percent sign",
"ampersand",
"apostrophe",
"left parenthesis",
"right parenthesis",
"asterisk",
"plus sign",
"comma",
"hyphen",
"period",
"slash",
"digit 0",
"digit 1",
"digit 2",
"digit 3",
"digit 4",
"digit 5",
"digit 6",
"digit 7",
"digit 8",
"digit 9",
"colon",
"semicolon",
"less-than",
"equals-to",
"greater-than",
"question mark",
"at sign",
"uppercase A",
"uppercase B",
"uppercase C",
"uppercase D",
"uppercase E",
"uppercase F",
"uppercase G",
"uppercase H",
"uppercase I",
"uppercase J",
"uppercase K",
"uppercase L",
"uppercase M",
"uppercase N",
"uppercase O",
"uppercase P",
"uppercase Q",
"uppercase R",
"uppercase S",
"uppercase T",
"uppercase U",
"uppercase V",
"uppercase W",
"uppercase X",
"uppercase Y",
"uppercase Z",
"left square bracket",
"backslash",
"right square bracket",
"caret",
"underscore",
"grave accent",
"lowercase a",
"lowercase b",
"lowercase c",
"lowercase d",
"lowercase e",
"lowercase f",
"lowercase g",
"lowercase h",
"lowercase i",
"lowercase j",
"lowercase k",
"lowercase l",
"lowercase m",
"lowercase n",
"lowercase o",
"lowercase p",
"lowercase q",
"lowercase r",
"lowercase s",
"lowercase t",
"lowercase u",
"lowercase v",
"lowercase w",
"lowercase x",
"lowercase y",
"lowercase z",
"left curly brace",
"vertical bar",
"right curly brace",
"tilde" };
cout << "\tCode" << "\tCharacter" << "\tWhat it means" << "\n";
cout << "\t#####################################\n\n";
for (int i = 33; i <= 126; i++)
{
cout << "\t" << i << "\t" << (char)i << "\t\t" << obj[i] << "\n";
}
return 0;
}
improvement. :-)
#include <iostream>
#include <vector>
using namespace std;
int main()
{
system("color 0A");
system("cls");
vector<string> obj = {
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"exclamation mark",
"quotation mark",
"number sign",
"dollar sign",
"percent sign",
"ampersand",
"apostrophe",
"left parenthesis",
"right parenthesis",
"asterisk",
"plus sign",
"comma",
"hyphen",
"period",
"slash",
"digit 0",
"digit 1",
"digit 2",
"digit 3",
"digit 4",
"digit 5",
"digit 6",
"digit 7",
"digit 8",
"digit 9",
"colon",
"semicolon",
"less-than",
"equals-to",
"greater-than",
"question mark",
"at sign",
"uppercase A",
"uppercase B",
"uppercase C",
"uppercase D",
"uppercase E",
"uppercase F",
"uppercase G",
"uppercase H",
"uppercase I",
"uppercase J",
"uppercase K",
"uppercase L",
"uppercase M",
"uppercase N",
"uppercase O",
"uppercase P",
"uppercase Q",
"uppercase R",
"uppercase S",
"uppercase T",
"uppercase U",
"uppercase V",
"uppercase W",
"uppercase X",
"uppercase Y",
"uppercase Z",
"left square bracket",
"backslash",
"right square bracket",
"caret",
"underscore",
"grave accent",
"lowercase a",
"lowercase b",
"lowercase c",
"lowercase d",
"lowercase e",
"lowercase f",
"lowercase g",
"lowercase h",
"lowercase i",
"lowercase j",
"lowercase k",
"lowercase l",
"lowercase m",
"lowercase n",
"lowercase o",
"lowercase p",
"lowercase q",
"lowercase r",
"lowercase s",
"lowercase t",
"lowercase u",
"lowercase v",
"lowercase w",
"lowercase x",
"lowercase y",
"lowercase z",
"left curly brace",
"vertical bar",
"right curly brace",
"tilde" };
cout << "\tCode" << "\tCharacter" << "\tWhat it means" << "\n";
cout << "\t#####################################\n\n";
for (int i = 33; i <= 126; i++)
{
cout << "\t" << i << "\t" << (char)i << "\t\t" << obj[i] << "\n";
}
return 0;
}