Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Coding-Club-Lab-Lyon/Sujets
Browse files Browse the repository at this point in the history
  • Loading branch information
Nellypal committed Apr 18, 2024
2 parents bcf277e + 928f822 commit fbe7805
Show file tree
Hide file tree
Showing 5 changed files with 893 additions and 847 deletions.
Binary file modified CpoolDay/Cpoolday.pdf
Binary file not shown.
11 changes: 11 additions & 0 deletions CpoolDay/cobra/mouli/mains/my_fibonacci.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include <stdio.h>

void my_fibonacci(int minimum, int maximum);

int main(int ac, char *av[])
{
if (ac != 3)
return 0;
my_fibonacci(atoi(av[1]), atoi(av[2]));
return 0;
}
20 changes: 20 additions & 0 deletions CpoolDay/cobra/mouli/refs/my_fibonaci.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include <stdio.h>

void my_fibonacci(int minimum, int maximum)
{
int n, first = 0, second = 1, next, c;

if (minimum > maximum || minimum == maximum)
return;
for (c = 0; next <= maximum; c++) {
if (c <= 1)
next = c;
else {
next = first + second;
first = second;
second = next;
}
if (next >= minimum && next <= maximum)
fprintf(stdout, "%d\n", next);
}
}
2 changes: 1 addition & 1 deletion CpoolDay/subject/data.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CpoolDay
1.0.4
1.0.6
Lyon
Loading

0 comments on commit fbe7805

Please sign in to comment.