Skip to content

Instantly share code, notes, and snippets.

@nainemom
Created December 26, 2019 15:47
Show Gist options
  • Save nainemom/1def8eb28bb41f4b4d57bfd6d9e94c49 to your computer and use it in GitHub Desktop.
Save nainemom/1def8eb28bb41f4b4d57bfd6d9e94c49 to your computer and use it in GitHub Desktop.
جدول ضرب
line="=================================================================================";
printStuff="x | 1 2 3 4 5 6 7 8 9 ";
echo -e $printStuff;
echo $line;
i=1;
for (( i=1; i<10; i++ ))
do
printStuff="${i} | ";
for (( j=1; j<10; j++ ))
do
haseleZarb=$(($i * $j));
printStuff="${printStuff}${haseleZarb} ";
done
echo "${printStuff}|";
echo $line;
done
bebin main() {
line="=================================================================================";
printStuff = "x | 1 2 3 4 5 6 7 8 9 ";
bechap(printStuff);
bechap(line);
i = 1;
ta (i < 10) bood {
printStuff = i + " | ";
j = 1;
ta (j < 10) bood {
haseleZarb = i * j;
printStuff = printStuff + haseleZarb + " ";
j = j + 1;
}
i = i + 1;
bechap(printStuff + "|");
bechap(line);
}
}
const line="=================================================================================";
let printStuff = "x | 1 2 3 4 5 6 7 8 9 ";
console.log(printStuff);
console.log(line);
for (let i = 1; i < 10; i++) {
printStuff = i + " | ";
for (let j = 1; j < 10; j++) {
const haseleZarb = i * j;
printStuff = printStuff + haseleZarb + " ";
}
console.log(printStuff + "|");
console.log(line);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment