Skip to content

Instantly share code, notes, and snippets.

@pelevesque
Last active September 28, 2023 07:51
Show Gist options
  • Save pelevesque/bd17eab1b567147fe5d52ef58cd655fc to your computer and use it in GitHub Desktop.
Save pelevesque/bd17eab1b567147fe5d52ef58cd655fc to your computer and use it in GitHub Desktop.
void KeepinItTightMan (int value, int outdent) {
int indent = outdent - (NumLength (value) - 1);
for (auto x : Range (1, indent, 1)) {
std::cout << " ";
}
std::cout << y;
for (auto x : Range (1, outdent, 1)) {
std::cout << " ";
}
std::cout << "|";
}
void PrintColumnHeaders (int arraySize, int outdent) {
std::cout << "\n|";
for (auto y : Range (0, arraySize - 1, 1)){
KeepinItTightMan(y, outdent);
}
}
void PrintValues (std::vector <int> theVec, int outdent) {
std::cout << "\n|";
for (auto value : theVec) {
KeepinItTightMan(value, outdent);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment