Skip to content

Instantly share code, notes, and snippets.

@bradley-evans
Created January 31, 2020 18:24
Show Gist options
  • Save bradley-evans/26158cb0cf7a731bcf7e214a1749fc3a to your computer and use it in GitHub Desktop.
Save bradley-evans/26158cb0cf7a731bcf7e214a1749fc3a to your computer and use it in GitHub Desktop.
#include <stdio.h>
int loop(int n, int a) {
int b = 0;
for(int i=0; i<n; i++) {
b = a + b;
}
return b;
}
int main() {
int a = 1;
int n = 200;
// TODO: initialize counters here
loop(n, a);
// TODO: read counters here
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment