00001 #include "gcd.hpp"00002
00003 int gcd(int n, int m)
00004 {
00005 if (n < 0)
00006 n = -n;
00007 while (m != 0) {
00008 int tmp(n % m);
00009 n = m;
00010 m = tmp;
00011 }
00012 return n;
00013 }
Generated on Sun Nov 30 09:53:22 2008 for Exploring C++ - Final Forms of Key Examples by
1.5.3