Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int factori(int n, int m)
- {
- int d=2, nr=0;
- while(n!=1 and m!=1)
- {
- if(n%d==0 and m%d==0)
- nr++;
- while(n%d==0)
- n/=d;
- while(m%d==0)
- m/=d;
- d++;
- }
- return nr;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement