/* Euklidov algoritam za odredjivanje NZD - preko deljenja - uklonjena rekurzija */
#include <stdio.h>

unsigned nzd(unsigned a, unsigned b) {
  while (b != 0) {
    unsigned r = a % b;
    a = b;
    b = r;
  }
  return a;
}

int main() {
  unsigned a = 105, b = 252;
  printf("NZD(%u, %u) = %u\n", a, b, nzd(a, b));
  return 0;
}