finished matrix addition func
This commit is contained in:
parent
3cb11a08b6
commit
1e24179a42
1 changed files with 16 additions and 38 deletions
54
main.c
54
main.c
|
@ -12,12 +12,12 @@ int main()
|
|||
printf("\n\n 1. Hypotenuse calculator");
|
||||
printf("\n 2. Quadratic formula calculator");
|
||||
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 7. Matrix multiplication");
|
||||
printf("\n 8. Scalar matrix multiplication");
|
||||
printf("\n\n Enter your choice here:_____");
|
||||
printf("\n 4. * Matrix determinant *");
|
||||
printf("\n 5. Matrix addition");
|
||||
printf("\n 6. * Matrix multiplication *");
|
||||
printf("\n 7. Scalar matrix multiplication");
|
||||
printf("\n\n * Stared entries are not fully programmed.");
|
||||
printf("\n Enter your choice here:_____");
|
||||
printf("\033[D");
|
||||
printf("\033[D");
|
||||
printf("\033[D");
|
||||
|
@ -81,54 +81,32 @@ int main()
|
|||
|
||||
case 4:
|
||||
|
||||
system("clear");
|
||||
// printf("\n ~~ Build a matrix ~~\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;
|
||||
//TODO: replace this
|
||||
|
||||
case 5:
|
||||
|
||||
system("clear");
|
||||
printf("\n ~~ Matrix determinant ~~\n\n");
|
||||
|
||||
break;
|
||||
|
||||
case 6:
|
||||
case 5:
|
||||
|
||||
system("clear");
|
||||
printf("\n ~~ Matrix addition ~~\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);
|
||||
|
||||
// printMatrix(numRows, numColumns, matrix1);
|
||||
// printf("\n");
|
||||
// printMatrix(numRows, numColumns, matrix2);
|
||||
// printf("\n");
|
||||
|
||||
// addMatrices(numRows, numColumns, matrix1, matrix2, sumMatrix);
|
||||
|
||||
// printMatrix(numRows, numColumns, sumMatrix);
|
||||
int Rows;
|
||||
int Columns;
|
||||
printf("\nPlease enter the number of rows: ");
|
||||
scanf("%d", &Rows);
|
||||
printf("\nPlease enter the number of columns: ");
|
||||
scanf("%d", &Columns);
|
||||
matrixAddition(Rows, Columns);
|
||||
|
||||
break;
|
||||
case 7:
|
||||
case 6:
|
||||
|
||||
system("clear");
|
||||
printf("\n ~~ Matrix multiplication ~~\n\n");
|
||||
|
||||
break;
|
||||
case 8:
|
||||
case 7:
|
||||
|
||||
system("clear");
|
||||
printf("\n ~~ Scalar matrix multiplication ~~\n\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue