projet-traduction-langage/fichiersRat/src-rat-tam-test/factrec.rat

15 lines
180 B
Plaintext
Raw Normal View History

2021-11-24 13:13:45 +00:00
int fact (int i int n){
int res = 0;
if (i=n){
res = i;
} else {
res = ( i * call fact ((i+1) n));
}
return res;
}
test{
int x = call fact (1 5);
print x;
}