Skip to content

Instantly share code, notes, and snippets.

@jserv
Last active September 1, 2019 06:48
Show Gist options
  • Save jserv/0c25f9f84c2566ad90a6b37dbc9fc6fb to your computer and use it in GitHub Desktop.
Save jserv/0c25f9f84c2566ad90a6b37dbc9fc6fb to your computer and use it in GitHub Desktop.
#include <stdio.h>
#define NUM 10000
int main() {
float sum = 0.0f;
for (int i = 0; i < NUM; i++) sum += i + 1;
printf("Sum: %f\n", sum);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment