How can I input number (int) without spaces?
I want to stop scanf as long as the input isn't zero. How can I do it?
#include <stdio.h>
int main()
int num;
{
while(num!=0){
printf("Enter the account activity: ");
scanf("%d", &num);
if(num==0){
break;
}
}
}