else(A[i]%2==1);{
the above line correctly:
else if (A[i] % 2 == 1) {
notice the if and no semicolon.
But to be fair, you could just write simply
else {
as at this point A[i] is already guaranteed to be odd. :)
One more note: the program does not print if a number is positive (p) or negative (n); it prints if a number is even (p) or odd (n). For this, it would be better to print "even" or "odd" and not "p" or "n".
If you need to decide if a number is positive or negative, then you should change your if condition accordingly.