daily pastebin goal
4%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. int main() {
  3.  int a,b;
  4.  scanf("%d%d",&a,&b );
  5.  while(b!=0 && a!=0){
  6.  if(a>b){
  7.  a=a%b;
  8.  }
  9.  else{
  10.  b=b%a;
  11.  }
  12.  }
  13.  if(a==0){
  14.  printf("%d",b);
  15.  }
  16.  else{
  17.  printf("%d",a);
  18.  }
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top