diff options
| author | Hyder Hadi <hyder@hyderhadi.xyz> | 2026-03-31 13:37:32 +0300 |
|---|---|---|
| committer | Hyder Hadi <hyder@hyderhadi.xyz> | 2026-03-31 13:37:32 +0300 |
| commit | 6b4e1641366f51e27eae78a2506b4b66d3e9cd4c (patch) | |
| tree | b0030b9b9eb4584f3b81a8344f4faa8a759989cd /simple-C-programs/MultiplicationTable.c | |
| parent | 30a472f58f204dfbf325b8b389c9f3008aa4c40b (diff) | |
Simple C exercises that i solved :D
Diffstat (limited to 'simple-C-programs/MultiplicationTable.c')
| -rw-r--r-- | simple-C-programs/MultiplicationTable.c | 26 |
1 files changed, 26 insertions, 0 deletions
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 <stdio.h> + +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; + } |
