Skip to content

Instantly share code, notes, and snippets.

@relrod
Created December 7, 2009 17:24
Show Gist options
  • Save relrod/250946 to your computer and use it in GitHub Desktop.
Save relrod/250946 to your computer and use it in GitHub Desktop.
// Fufills ( http://rosettacode.org/wiki/Sum_a_series ) in Pike.
int main(){ // S(x) = 1/x2, from 1 to 1000
int sum = 0;
for(int i = 1; i <= 100; i++){
sum = sum + (1 / pow(i,2));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment