added matrix addition
This commit is contained in:
parent
b1346999f3
commit
65fe43ddab
1 changed files with 20 additions and 11 deletions
31
main.c
31
main.c
|
@ -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");
|
||||
|
|
Loading…
Add table
Reference in a new issue