diff --git a/main.c b/main.c index 8d3cb86..3529eab 100644 --- a/main.c +++ b/main.c @@ -40,9 +40,9 @@ void test() { read_csv("csv/graph.csv", vertex_count, vertex_count, adjacency_matrix); - printf("G:\n"); + puts("G:"); print_matrix(vertex_count, vertex_count, adjacency_matrix); - printf("\n"); + puts(""); // uint64_t new_matrix1[vertex_count][vertex_count]; // @@ -50,9 +50,9 @@ void test() { // vertex_count, vertex_count, adjacency_matrix, // new_matrix1); // - // printf("G²:\n"); + // puts("G²:"); // print_matrix(vertex_count, vertex_count, new_matrix1); - // printf("\n"); + // puts(""); // // uint64_t new_matrix2[vertex_count][vertex_count]; // @@ -62,17 +62,17 @@ void test() { // vertex_count, vertex_count, adjacency_matrix, // new_matrix2); // - // printf("G³:\n"); + // puts("G³:"); // print_matrix(vertex_count, vertex_count, new_matrix2); - // printf("\n"); + // puts(""); uint64_t distance_matrix[vertex_count][vertex_count]; calculate_distance_matrix(vertex_count, adjacency_matrix, distance_matrix); - printf("distance_matrix:\n"); + puts("distance_matrix:"); print_matrix(vertex_count, vertex_count, distance_matrix); - printf("\n"); + puts(""); } int main(void) { diff --git a/matrix.c b/matrix.c index 2c2555c..408e1b8 100644 --- a/matrix.c +++ b/matrix.c @@ -10,7 +10,7 @@ void print_matrix(const uint64_t row_length, const uint64_t column_length, const for (uint64_t row_index=0; row_index < row_length; row_index++) { printf("%lu ", matrix[row_index][column_index]); } - printf("\n"); + puts(""); } } @@ -48,7 +48,7 @@ int read_csv(const char *file_name, const uint64_t row_length, const uint64_t co file_ptr = fopen(file_name, "r"); if (file_ptr == NULL) { - printf("Unable to open csv\n"); + puts("Unable to open csv"); return 1; }