-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
47 lines (40 loc) · 1.12 KB
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include <stdlib.h>
#include <stdio.h>
#include "matrix_process.h"
#include "matrix_operations.h"
/**
* @brief Main function to perform matrix operations.
*
* This function prompts the user to choose a matrix operation and performs the selected operation
* based on the user's input.
*
* @return The exit status of the program.
*/
int main(void)
{
int choice = 0;
printf("What operation would you like to perform?\n");
printf("1. Matrix addition/subtraction\n");
printf("2. Matrix multiplication\n");
printf("3. Find determinant of a matrix\n");
printf("4. Find matrix transpose\n");
scanf("%d", &choice);
switch (choice) {
case 1:
perform_multi_matrix_operation(matrix_addition);
break;
case 2:
perform_multi_matrix_operation(matrix_multiplication);
break;
case 3:
perform_single_matrix_operation(choice);
break;
case 4:
perform_single_matrix_operation(choice);
break;
default:
printf("Invalid choice!\n");
break;
}
return 0;
}