Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 28th, 2012  |  syntax: C  |  size: 0.25 KB  |  views: 28  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. }
clone this paste RAW Paste Data