/********************************************************************** File: main.cc Description: A program that computes the integral of a function in parallel with pthreads. Author: Dana Vrajitoru Organization: IUSB Date: August, 2020 Compilation command: g++ integral.cc main.cc -o integral -lpthread Run with: integral or ./integral ***********************************************************************/ #include #include #include "integral.h" int main() { int nthr; nthr = input_data(); pthread_t *threads = new pthread_t[nthr]; create_threads(threads, nthr); synchronise(threads, nthr); output_results(); return 0; } /************************ Example of output *************************** ***********************************************************************/