How can i make in such a way that the negative is ignored before adding up the number ??
Eg: I want the following the code to print out 13 instead of -1.
Code:
double hello[]={-1,2,4,-6};
for(i=0; i<=3; i++)
{
xxx = xxx + hello[i];
}
printf("%f",xxx);