/* the main program for project 2. It includes all the functions for phase 1 of the project. Gang Qu April 14, 2026 */ #include #include #include "sparse.h" // include the header file int main(int argc, char *argv[]) { FILE *in, *out; ROOT **M; int i, j, k; ROOT *SUM; SUM = make_root(); if (argc < 2) { printf("Usage: a.out input1 input2 ... output\n"); exit(0); } M = (ROOT **) malloc((argc-1)*sizeof(ROOT *)); if (M == NULL) exit(0); out = fopen(argv[argc-1], "w"); if (out == NULL) { printf("output file %s cannot open ...\n", argv[argc-1]); exit(0); } for (i=1; i