Skip to content

Instantly share code, notes, and snippets.

@poseidon4o
Last active June 23, 2022 21:30
Show Gist options
  • Save poseidon4o/7283e42b1798ddb25033b751672a826f to your computer and use it in GitHub Desktop.
Save poseidon4o/7283e42b1798ddb25033b751672a826f to your computer and use it in GitHub Desktop.
void printNumbers(/*TODO:*/) {
/*TODO:*/
for (int c = start; c < stop; c += step) {
std::cout << c << ' ';
}
std::cout << std::endl;
}
int main() {
printNumbers(name::start = 0, name::stop = 10, name::step = 1);
printNumbers(name::stop = 55, name::start = 5, name::step = 5);
// 0 1 2 3 4 5 6 7 8 9
// 5 10 15 20 25 30 35 40 45 50
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment