added header file #7

Merged
SinusFox merged 1 commits from task7-header-file into main 2023-05-30 08:31:07 +00:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit 088c70fef0 - Show all commits
+3 -6
View File
@@ -1,12 +1,9 @@
#include <stdio.h> #include "7_Matrix_1x1.h"
int main() { int main() {
// setting the end of the array
int upTo = 20;
// printing the values as matrix // printing the values as matrix
for (int i = 1; i <= upTo; i++) { // y axis for (int i = 1; i <= UPTO; i++) { // y axis
for (int j = 1; j <= upTo; j++) { // x axis for (int j = 1; j <= UPTO; j++) { // x axis
printf("%5i", (i*j)); // printing each value, i*j = the value printf("%5i", (i*j)); // printing each value, i*j = the value
} }
printf("\n"); // end of line on x axis printf("\n"); // end of line on x axis
+3
View File
@@ -0,0 +1,3 @@
#include <stdio.h>
#define UPTO 20 // maximum value