Hi there,
I am computer engineer I studied statistics and math in my college and made a lot of projects using them in C/C++, I could solve the problem By hand , and I would love to make a program in c solve it and change the starting point to be as you want, I would also use simple functions and professional comments to make the code readable ,and I will care for plagiarism, no copy paste it's unique code from scratch , more details to be shared in the chat, and I will deliver your task in 2 days maximum included all the edits you want,
regards,
mostafa.