/trunk/Examples/guile/simple/example.c
C | 21 lines | 14 code | 5 blank | 2 comment | 2 complexity | a8c48972e5f7013b1061325f682d0858 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- /* Simple example from documentation */
- /* File : example.c */
- #include <time.h>
- double My_variable = 3.0;
- int fact(int n) {
- if (n <= 1) return 1;
- else return n*fact(n-1);
- }
- int mod(int n, int m) {
- return (n % m);
- }
- char *get_time() {
- long ltime;
- time(<ime);
- return ctime(<ime);
- }