Skip to content

Instantly share code, notes, and snippets.

@jandk
Created June 18, 2012 22:02
Show Gist options
  • Save jandk/2950995 to your computer and use it in GitHub Desktop.
Save jandk/2950995 to your computer and use it in GitHub Desktop.
Project Euler #1
#include <stdio.h>
int main(int argc, char** argv) {
int i, sum = 0;
for(i = 0; i < 1000; i++)
if(i%3 == 0 || i%5 == 0)
sum += i;
printf("%d\n", sum);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment