added matrix addition

This commit is contained in:
superdimensional 2021-04-18 17:56:33 -04:00
parent b1346999f3
commit 65fe43ddab

31
main.c
View file

@ -14,6 +14,7 @@ int main()
printf("\n 3. Area of a circle");
printf("\n 4. Build a matrix");
printf("\n 5. Matrix determinant");
printf("\n 6. Matrix addition");
printf("\n\n Enter your choice here:_____");
printf("\033[D");
printf("\033[D");
@ -90,19 +91,27 @@ int main()
break;
// case 5:
case 5:
// system("clear");
// printf("\n ~~ Matrix determinant ~~\n\n");
// int numRows;
// int numColumns;
// printf("\nPlease enter the number of rows:");
// scanf("%d", &numRows);
// printf("\nPlease enter the number of columns:");
// scanf("%d", &numColumns);
// buildMatrix(numRows, numColumns);
system("clear");
printf("\n ~~ Matrix determinant ~~\n\n");
int numRows;
int numColumns;
printf("\nPlease enter the number of rows:");
scanf("%d", &numRows);
printf("\nPlease enter the number of columns:");
scanf("%d", &numColumns);
buildMatrix(numRows, numColumns);
// break;
break;
case 6:
system("clear");
printf("\n ~~ Matrix addition ~~\n\n");
break;
default:
printf("\n Incorrect input, try again.\n");