#include <stdio.h> int main() { int i; long sum=0; for( i=1; i<=1000; i+=2 ) { sum += i; } printf("sum=%ld\n",sum); system("pause"); return 0; }