/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
- #include <stdio.h>
- int Circle (int x, int y, int radius) {
- /* Draw Circle */
- printf("Drawing the circle...\n");
- /* Return -1 to test contract post assertion */
- if (radius == 2)
- return -1;
- else
- return 1;
- }