#include <stdio.h>
int main()
{
int sum = 0, times = 0, a, a1 = 0;
printf("Please input a: (0 for add, others for subtract): \n");
scanf("%d", &a);
if(a == 0)
{
printf("Please input the NO. of the numbers: \n");
scanf("%d", ×);
for(int i = 0; i < times; i++)
{
scanf("%d", &a1);
if(i == 0)
{
sum = i;
};
else
{
sum += i;
};
};
printf("the result: %d\n", sum);
};
else
{
printf("Please input the NO. of the numbers: \n");
scanf("%d", ×);
for(int i = 0; i < times; i++)
{
scanf("%d", &a1);
if(i == 0)
{
sum = i;
};
else
{
sum -= i;
};
};
printf("the result: %d\n", sum);
};
return 0;
};