<prompt> Kuandika programu ya C multi-threaded mahesabu ya tarakimu ya PI.  <response>: Here is an example of a multi-threaded C program to calculate the digits of PI:include include include include using namespace std;mutex mut;void pi_digitsint start, int end, vector digits int carry 0; for int i end; i start; i-- int sum 0; for int j i; j 0; j-- sum sum j digitsj 10000; digitsj sum j 2 - 1; sum j 2 - 1; carry carry digits1 10000; digits1 10000; mut.lock; cout carry; for int i 2; i digits.size; i printf04d, digitsi 10000; digitsi digitsi 10000; mut.unlock;int main const int num_threads 4; vector digits100; vector threadsnum_threads; for int i 0; i num_threads; i int start i digits.size - 1 num_threads 1; int end i 1 digits.size - 1 num_threads; threadsi threadpi_digits, start, end, refdigits; for auto t : threads t.join; return 0;This program uses the Bailey-Borwein-Plouffe BBP formula to calculate the digits of PI. The formula is split into several sections, and each section is calculated by a separate thread. The threads write their results to a shared vector called digits, which stores the individual digits of PI.The program uses a mutex to ensure that only one thread writes to the console at a time. The refdigits argument is used to pass the vector by reference to the threads. Finally, the program creates a vector of threads and joins them together when they have finished their work. 