From 6b4e1641366f51e27eae78a2506b4b66d3e9cd4c Mon Sep 17 00:00:00 2001 From: Hyder Hadi Date: Tue, 31 Mar 2026 13:37:32 +0300 Subject: Simple C exercises that i solved :D --- simple-C-programs/MultiplicationTable.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 simple-C-programs/MultiplicationTable.c (limited to 'simple-C-programs/MultiplicationTable.c') diff --git a/simple-C-programs/MultiplicationTable.c b/simple-C-programs/MultiplicationTable.c new file mode 100644 index 0000000..2135d31 --- /dev/null +++ b/simple-C-programs/MultiplicationTable.c @@ -0,0 +1,26 @@ +#include + +int main() { + + printf("Multiplication table to 10x10\n"); + + int multi_table[10][10]; + + for(int i = 0;i < 10;i++) { + for(int j = 0;j < 10;j++) { + multi_table[i][j] = (j + 1) * (i + 1); + } + } + + for(int i = 1; i <= 10;i++) { + for(int j = 1; j <= 10;j++) { + printf("%d ", multi_table[i - 1][j - 1]); + if ((j % 10) == 0) { + printf("\n"); + } + } + } + + printf("\n"); + return 0; + } -- cgit v1.2.3