I want to implement Shamir's Secret Sharing algorithm in cpp

Job ID: 32261573

Budget: $10 – $30 USD

I want to implement Shamir's Secret Sharing algorithm in cpp
https://en.wikipedia.org/wiki/Shamir%27s_Secret_Sharing

There is a python implementation in the wiki

But the issue is that I am not getting the answer I want in the cpp file

The result should be 45 but I get the wrong one.