title: Scanf every number in input until user input 0
body: <p>I need to make a program that asks user to input an indeterminate count of numbers and end the input with number 0.</p>
  
  <p>After input I need to do prime factorization of every number from input.</p>
  
  <p>I have this now, but it only works for first number from input and then ends the program.</p>
  
  <pre><code>int main()
  {        
      long long number,div;       
      while(scanf("%lli",&amp;number)==1){
          printf("The prime factors of %lli are: \n",number);
  
          div = 2;
  
          while(number!=0){
              if(number%div!=0)
                  div = div + 1;
              else {
                  number = number / div;
                  printf("%lli ",div);
                  if(number==1)
                      break;
              }
          }
          printf("\n");
          return 0;
      }
      return 0;
  }
  </code></pre>