forked from GitHub/gf-core
restored gfcc example (GF C compiler)
This commit is contained in:
20
examples/gfcc/abs.c
Normal file
20
examples/gfcc/abs.c
Normal file
@@ -0,0 +1,20 @@
|
||||
int abs (int x){
|
||||
int y ;
|
||||
{
|
||||
if (x < 0){
|
||||
y = 0 - x ;
|
||||
}
|
||||
else {
|
||||
y = x ;
|
||||
}
|
||||
}
|
||||
return y ;
|
||||
} ;
|
||||
int main () {
|
||||
int i ;
|
||||
i = abs (16);
|
||||
printf ("%d",i) ;
|
||||
return ;
|
||||
} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user