Skip to content

Instantly share code, notes, and snippets.

@jschoch
Last active October 11, 2021 21:00
Show Gist options
  • Save jschoch/544fe495e8b0f43756bfb03f69e802d4 to your computer and use it in GitHub Desktop.
Save jschoch/544fe495e8b0f43756bfb03f69e802d4 to your computer and use it in GitHub Desktop.
for a repl
#include <iostream>
void setup(){
// put your setup here
std::cout << "in setup\n";
}
void loop(){
//put your loop here
// instead of println just do
int data = 0;
std::cout << "stuff you want to print " << data << " newline \n";
}
// ignore this
int main() {
// this runs once
setup();
// this controls how many times loop() runs
int loops = 4;
for(int i = 0; i < loops;i++){
loop();
}
std::cout << "Done\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment