PageRenderTime 48ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Examples/contract/simple_c/example.c

#
C | 11 lines | 8 code | 1 blank | 2 comment | 2 complexity | 038f1516a1fce7b7c6530ad93c86ea80 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. #include <stdio.h>
  2. int Circle (int x, int y, int radius) {
  3. /* Draw Circle */
  4. printf("Drawing the circle...\n");
  5. /* Return -1 to test contract post assertion */
  6. if (radius == 2)
  7. return -1;
  8. else
  9. return 1;
  10. }