计算1-3+5-7+…-99+101的值
=1+(5-3)+(9-7)+(13-11)+.+(101-99)
=1+2×25
=51
=1+2+2+2+···+2﹙共25个﹚
=1+50
=51
原式=(1-3)+(5-7)+…(97-99)+101
=-2*(50/2)+101
=-50+101
=51
或原式=1+(-3+5)+(-7+9)…(-99+101)
=1+2*25
=51
祝你学业进步!
呃...
#include
main()
{
int i,element,sum=0;
for(i=1;i