#include<stdio.h>
int main()
{
int sum=0,i,sign=-1;
for (i=1;i<=101;i+=2)
{
sign = sign*(-1);
sum = sum+sign*i;
printf("***%d,%d***
",sign*i,sum);
}
printf("%d
",sum);
}
#include<stdio.h>
int main()
{
int sum=0,i,sign=-1;
for (i=1;i<=101;i+=2)
{
sign = sign*(-1);
sum = sum+sign*i;
printf("***%d,%d***
",sign*i,sum);
}
printf("%d
",sum);
}