Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Programming: input an integer value k from the keyboard, recover k integer num, count the number of positive numbers, zero numbers and negative numbers, and store them in shaping respectively.
Programming: input an integer value k from the keyboard, recover k integer num, count the number of positive numbers, zero numbers and negative numbers, and store them in shaping respectively.
# include & ltstdio.h & gt

int main()

{int k,num,a,b,c,I;

a = b = c = 0;

scanf("%d ",& ampk);

for(I = 0; I & ltk;; i++)

{scanf("%d ",& ampnum);

if(num & gt; 0)a++;

else if(num & lt; 0)b++;

else c++; }

Printf ("positive number: %d\nNegative number:% d \ nZero: %d\n", a, b, c);

Returns 0;

}