Merge pull request #7 from SinusFox/task7-header-file
added header file
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#define UPTO 20 // maximum value
|
||||||
Reference in New Issue
Block a user