Skip to content

Instantly share code, notes, and snippets.

@wwhhjj
Created November 15, 2011 12:24
Show Gist options
  • Save wwhhjj/1366956 to your computer and use it in GitHub Desktop.
Save wwhhjj/1366956 to your computer and use it in GitHub Desktop.
#include"stdio.h"
main()
{
int a,b,i,t;
scanf("%d%d",&a,&b);
if (a<b)
t=a;
a=b;
b=t;
for(i=2;i<=b;i++)
if(a%i==0&&b%i==0)
printf("%d",i);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment