projet-traduction-langage/fichiersRat/src-rat-tam-test/factiter.rat
2021-11-24 14:13:45 +01:00

11 lines
161 B
Plaintext

fact {
const n = 5;
int fact = 1;
int i = 1;
while (i < (n+1)) {
fact = (fact * i);
i = (i + 1);
}
print fact;
}