title: Finding GCD with C
body: <p>My question is when i type in something like "10 0" i get 10 as GCD. I thought the programming would not execute if i typed in 0 or shoe GCD as 0 and not 10. I have tried with other integers and it seems to work except for 0.</p>
  
  <pre><code>  int m, n, remainder;
  
    printf ("Enter two intergers: ");
    scanf("%d%d", &amp;m, &amp;n);
  
    while (n != 0 )
    {     
      remainder = m % n;    
      m = n;    
      n = remainder;
    }    
  
    printf("GCD: %d\n\n", m);
  </code></pre>