PageRenderTime 39ms CodeModel.GetById 34ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/trunk/Examples/guile/simple/example.c

#
C | 21 lines | 14 code | 5 blank | 2 comment | 2 complexity | a8c48972e5f7013b1061325f682d0858 MD5 | raw file
 1/* Simple example from documentation */
 2/* File : example.c */
 3
 4#include <time.h>
 5
 6double My_variable = 3.0;
 7
 8int fact(int n) {
 9  if (n <= 1) return 1;
10  else return n*fact(n-1);
11}
12
13int mod(int n, int m) {
14  return (n % m);
15}
16
17char *get_time() {
18  long ltime;
19  time(&ltime);
20  return ctime(&ltime);
21}