Skip to content

Instantly share code, notes, and snippets.

@donly
Forked from wwhhjj/gist:1366956
Created November 15, 2011 13:28
Show Gist options
  • Save donly/1367070 to your computer and use it in GitHub Desktop.
Save donly/1367070 to your computer and use it in GitHub Desktop.
再次提醒注意代码书写风格!
#include <stdio.h>
int main (int argc, const char * argv[]) {
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\t", i);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment