#include<stdio.h>main() { int i,s,f; s=0,f=1,i=1; while(i<=100) { s=s+i*f; f=-f; i=i+1;}printf("%d\n",s); }//1-2+3……+100