Skip to content

Instantly share code, notes, and snippets.

@bentrevett
Created February 1, 2017 20:37
Show Gist options
  • Save bentrevett/91b2b91691ee9c0d66a094a17875932f to your computer and use it in GitHub Desktop.
Save bentrevett/91b2b91691ee9c0d66a094a17875932f to your computer and use it in GitHub Desktop.
"Write a program that prints a table of ASCII values for the characters in the ASCII character set from 33 to 126. The program should print the decimal, octal, hex and character value for each character."
for (char c = 33; c < 126; c++)
{
cout << dec << int(c) << hex << " " << int(hex) << int(c) << " " << oct << int(c) << " " << c << "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment