Projet-Systemes-Informatiques/testFile
2023-05-31 16:47:20 +02:00

20 lines
297 B
Text

int main() {
int i, n, nextTerm, t1, t2;
i = 0;
n = 20; // put here the number you want !
t1 = 0;
t2 = 1;
nextTerm = t1 + t2;
n = n - 3; // cause nextTerm already contains the 3rd term
while (i <= n){
t1 = t2;
t2 = nextTerm;
nextTerm = t1 + t2;
i = i+1;
}
}