42us-stupidity
42us-stupidity copied to clipboard
Day 04 - ex03: Expected 8 lines, got 0.
Does this happen for anyone else? My version of day04 ex03 passes moulinette, but does not pass stupidity.
I get the following error message: !!!! ERROR in work/ex03/main: expected 8 lines, got 0
I cant confirm any of this, but day 04 ex03 looks good. considering it compiled main, i assume the correct files and functions are present. what's possible is that someone programmed the recursive function incorrectly, causing it to stack overflow due to out-of-control recursion, and thus crash. this would produce no resulting lines as in your case.
day 04 ex03 code:
int res, exp;
res = ft_recursive_power(2, 2), exp = 4;
printf("2^2 (%d vs %d) -> %d\n", res, exp, res == exp);
res = ft_recursive_power(2, 1), exp = 2;
printf("2^1 (%d vs %d) -> %d\n", res, exp, res == exp);
res = ft_recursive_power(2, 0), exp = 1;
printf("2^0 (%d vs %d) -> %d\n", res, exp, res == exp);
res = ft_recursive_power(2, -1), exp = 0;
printf("2^-1 (%d vs %d) -> %d\n", res, exp, res == exp);
res = ft_recursive_power(2, 4), exp = 16;
printf("2^4 (%d vs %d) -> %d\n", res, exp, res == exp);
res = ft_recursive_power(5, 3), exp = 125;
printf("5^3 (%d vs %d) -> %d\n", res, exp, res == exp);
res = ft_recursive_power(3, 5), exp = 243;
printf("3^5 (%d vs %d) -> %d\n", res, exp, res == exp);
res = ft_recursive_power(2, 1000000), exp = -1;
printf("2^1000000 (%d vs %d) -> %d\n", res, exp, 1);
Overflows don’t have to be handled.
as of today's instruction. I don't think the last test should still be there?
Can someone try to contact the author so that he approves my pull request