Advertisement
Guest User

Untitled

a guest
Feb 28th, 2012
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <conio.h>
  3.  
  4. int calcGCD (int value1, int value2) {
  5.     if (value2 == 0) {
  6.         return value1;
  7.     }
  8.     else {
  9.         return calcGCD(value2, (value1%value2));
  10.     }
  11. }
  12. int main() {
  13.     printf("%d\n", calcGCD(700,350));
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement