added header file

This commit is contained in:
SinusFox
2023-05-30 10:16:44 +02:00
parent 5779ad76ee
commit 088c70fef0
2 changed files with 6 additions and 6 deletions
+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