PageRenderTime 20ms CodeModel.GetById 17ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/ruby/simple/example.c

#
C | 18 lines | 11 code | 4 blank | 3 comment | 1 complexity | e23a52329483450248d1cc30b9f369a0 MD5 | raw file
 1/* File : example.c */
 2
 3/* A global variable */
 4double Foo = 3.0;
 5
 6/* Compute the greatest common divisor of positive integers */
 7int gcd(int x, int y) {
 8  int g;
 9  g = y;
10  while (x > 0) {
11    g = x;
12    x = y % x;
13    y = g;
14  }
15  return g;
16}
17
18