Skip to content
Snippets Groups Projects
Commit 16b1c555 authored by BARRE Milo's avatar BARRE Milo
Browse files

Test

parent e4a80fd6
Branches
Tags
No related merge requests found
ex2.ts 0 → 100644
// Exercice 2
function deb1t(): number {
let j = 200;
let tab: number[] = [];
for (let i = 0; i < 10; i++) {
j -= 10;
tab[i] = j;
}
return j;
}
deb1t();
\ No newline at end of file
ex3.ts 0 → 100644
function deb2 (x: number, y: number):void{
const tmp = y;
y=x;
x=tmp;
console.log(x,y);
}
let x = 10;
let y = 20;
deb2 (x,y);
console.log(x,y);
\ No newline at end of file
ex4.ts 0 → 100644
function deb3 (xy: number[]):void{
let tmp = xy [0];
xy[0] = xy[1];
xy[1]=tmp;
console.log(xy);
}
let xy=[10, 20];
deb3(xy);
console.log(xy);
\ No newline at end of file
function deb1():number{
let j = 200;
for (let i = 0; i< 10; i++){
j -=10;
}
return j;
}
deb1();
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment