Answer:
#include <stdio.h>
int main() {
int p=0, n=0, z=0, inp=0;
printf("How do I write a C program to read numbers until -1 "
"is encountered and also count the number of positive, negative, "
"zeroes encountered by users using a while loop?\\\\\\");
printf("Enter an integer (-1 to quit): ");
scanf("%d",&inp);
while(inp != -1) {
if(inp > 0) p++;
else if(inp < 0) n++;
else z++;
printf("\\Enter next integer (-1 to quit): ");
scanf("%d",&inp);
}
n++; /* -1 is also a -ve number */
printf("You have entered ...\\");
printf("\t\tPositive numbers: %d\\",p);
printf("\t\tNegative numbers: %d\\",n);
printf("\t\t Zeroes: %d\\",z);
}
Step-by-step explanation: