Skip to content
Snippets Groups Projects
Commit f38f4845 authored by SWIATOKA Maximilien's avatar SWIATOKA Maximilien
Browse files

Replace td_debug.ts

parent f92011fb
No related branches found
No related tags found
No related merge requests found
...@@ -68,7 +68,18 @@ ...@@ -68,7 +68,18 @@
// if( x = 0 || y = 0) return x*y; // if( x = 0 || y = 0) return x*y;
// else if( x = 0 && y = 0) return - x*y; // else if( x = 0 && y = 0) return - x*y;
// else return x * y; // else return x * y;
// } // }
// console.log(deb7(5, -3)); // console.log(deb7(5, -3));
//exercice 8
function deb8(n: number): number {
if (n === 0) {
return 1;
}
return n * deb8(n - 1);
}
const n = 5;
console.log(deb8(n));
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment