Input ten numbers on the keyboard of C language, and calculate the sum of positive and negative numbers respectively

Input ten numbers on the keyboard of C language, and calculate the sum of positive and negative numbers respectively

Sum should be:
# Include
# Include
Main ()
{
Int i, up=0, down=0, data [10];
For (i=0, i0)
Up+=data [i];
Else
Down+=data [i];
}
Printf (" up=% d, down=% d ", up, down);
Getch ();
}

C language solution, any input 10 numbers, respectively calculate the sum of positive and negative numbers. # Include Main () { Int a [10]; Int i,zheng =0, fu =0; Scanf ("% d ",& a [10]); For (i=1; i

# Includemain ()/*void main () is correct */{ int a [10]; int i,zheng =0, fu=0; scanf ("% d ",& a [10]);/* variable should be & a [i] when input, this is variable, and array change...