Skip to content

Instantly share code, notes, and snippets.

@a1phanumeric
Created October 18, 2012 10:21
Show Gist options
  • Save a1phanumeric/3910889 to your computer and use it in GitHub Desktop.
Save a1phanumeric/3910889 to your computer and use it in GitHub Desktop.
Project Euler - Problem 1
#include <stdio.h>
int main(){
int i;
int total;
for(i = 0; i<1000; i++) total+=(i%3==0 || i%5==0) ? i : 0;
printf("%i", total);
printf("\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment