PageRenderTime 42ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Examples/r/simple/example.c

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