Created
December 27, 2010 08:59
-
-
Save masarakki/755974 to your computer and use it in GitHub Desktop.
ほげほげ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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