int inputNum;
int positive = 0;
int negative = 0;
int Zero=0;
int choice;
do
{
printf("\nEnter the number
");
scanf("%d",&inputNum);
inputNum >= 0 ? (inputNum == 0 ? (Zero +=1) :(positive +=
1)) : (negative +=1);
printf("\nDo you want to enter
more number(1/0) : ");
scanf("%d",&choice);
}
while(choice==1);
printf("\nPositive Number(s):
%d \nNegative Number(s): %d \nZero(s): %d ",positive,negative,Zero);
Thanks
ReplyDelete