source/benchmark.c
void printResults(double cpu_time_used, double memory_used, int algorithm, int vector_size, int generation_type)
{
    printf("------------------------------\n");
    printf("Algorithm: ");

    switch(algorithm)
    {
            case 1:
                printf("Bubble Sort.\n");
                break;

            case 2:
                printf("Selection Sort.\n");
                break;

            case 3:
                printf("Insertion Sort.\n");
                break;

            case 4:
                printf("Shell Sort.\n");
                break;

            case 5:
                printf("Heap Sort.\n");
                break;

            case 6:
                printf("Merge Sort.\n");
                break;

            case 7:
                printf("Quick Sort.\n");
                break;

            case 8:
                printf("Counting Sort.\n");
                break;

            default:
                printf("Error!\n");
                exit(3); //Means that the algorithm value is invalid.
        }

    printf("Vector Size: %d.\n", vector_size);
    printf("Vector Generation Type: ");

    switch(generation_type)
    {
            case 1:
                printf("Ascending.\n");
                break;

            case 2:
                printf("Descending.\n");
                break;

            case 3:
                printf("Random.\n");
                break;

            default:
                printf("Error!\n");
                exit(4); //Means that the vector generation type is invalid.
        }

    printf("Runtime: %f Seconds.\n", cpu_time_used);
    printf("Memory Usage: %f MB.\n", memory_used);
}
//Receives data from "benchmark" function and prints it to console.

Receives data from "benchmark" function and prints it to console.
Receives data from " benchmark " function and prints it to console .
void printResults(double cpu_time_used, double memory_used, int algorithm, int vector_size, int generation_type)
{
    printf("------------------------------\n");
    printf("Algorithm: ");
    switch(algorithm)
    {
            case 1:
                printf("Bubble Sort.\n");
                break;
            case 2:
                printf("Selection Sort.\n");
                break;
            case 3:
                printf("Insertion Sort.\n");
                break;
            case 4:
                printf("Shell Sort.\n");
                break;
            case 5:
                printf("Heap Sort.\n");
                break;
            case 6:
                printf("Merge Sort.\n");
                break;
            case 7:
                printf("Quick Sort.\n");
                break;
            case 8:
                printf("Counting Sort.\n");
                break;
            default:
                printf("Error!\n");
                exit(3); 
        }
    printf("Vector Size: %d.\n", vector_size);
    printf("Vector Generation Type: ");
    switch(generation_type)
    {
            case 1:
                printf("Ascending.\n");
                break;
            case 2:
                printf("Descending.\n");
                break;
            case 3:
                printf("Random.\n");
                break;
            default:
                printf("Error!\n");
                exit(4); 
        }
    printf("Runtime: %f Seconds.\n", cpu_time_used);
    printf("Memory Usage: %f MB.\n", memory_used);
}
void printResults ( double cpu_time_used , double memory_used , int algorithm , int vector_size , int generation_type ) { printf ( " \n " ) ; printf ( " " ) ; switch ( algorithm ) { case 1 : printf ( " \n " ) ; break ; case 2 : printf ( " \n " ) ; break ; case 3 : printf ( " \n " ) ; break ; case 4 : printf ( " \n " ) ; break ; case 5 : printf ( " \n " ) ; break ; case 6 : printf ( " \n " ) ; break ; case 7 : printf ( " \n " ) ; break ; case 8 : printf ( " \n " ) ; break ; default : printf ( " \n " ) ; exit ( 3 ) ; } printf ( " \n " , vector_size ) ; printf ( " " ) ; switch ( generation_type ) { case 1 : printf ( " \n " ) ; break ; case 2 : printf ( " \n " ) ; break ; case 3 : printf ( " \n " ) ; break ; default : printf ( " \n " ) ; exit ( 4 ) ; } printf ( " \n " , cpu_time_used ) ; printf ( " \n " , memory_used ) ; }
Receives data from "benchmark" function and prints it to console.
Receives data from " benchmark " function and prints it to console .
//Means that the algorithm value is invalid.
 //Means that the vector generation type is invalid.
