- public static int euclid_iter(int m, int n)
- {
- int x = m;
- int y = n;
- int d;
- //
- while(x!=y)
- {
- if(y>x)
- {
- d = y-x;
- y = d;
- }
- else if(y<x)
- {
- d = x-y;
- x = d;
- }
- }
- return(x);
- }

By: D | Date: Oct 29 2009 19:31 | Format: None | Expires: never | Size: 244 B | Hits: 819
Latest pastes
1 days ago
6 days ago
8 days ago
10 days ago
10 days ago