Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 577 Bytes

File metadata and controls

39 lines (29 loc) · 577 Bytes

509. Question 509

All prompts are owned by LeetCode. To view the prompt, click the title link above.

Back to top


First completed : June 17, 2024

Last updated : June 17, 2024


Related Topics : N/A

Acceptance Rate : Unknown


Solutions

C

int fib(int n){
    int a = 0;
    int b = 1;
    while (n > 0) {
        int temp = a + b;
        a = b;
        b = temp;
        n--;
    }
    return a;
}