Skip to content

Instantly share code, notes, and snippets.

@masarakki
Created December 27, 2010 08:59
Show Gist options
  • Save masarakki/755974 to your computer and use it in GitHub Desktop.
Save masarakki/755974 to your computer and use it in GitHub Desktop.
ほげほげ
#include <stdio.h>
void main(int argc, char** argv){
int i, a = atoi(argv[1]), b = atoi(argv[2]), sum = 0;
for(i = (a > 0 ? a : 0); i <= b && i <= 100; i ++){
sum += (1 - i % 2) * i;
}
printf("sum = %d\n", sum);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment