At the moment i am tackling the cs50x projects and i need a little bit of help with problem set 1, the 'greedy algorithm'. I am unsure why my program doesn't work. Can you please help me troubleshoot? My program is attached: The answer to the attached terminal pic is supposed to be 4.
![At the moment i am tackling the cs50x projects and i need a little bit of help with problem set 1 the greedy algorithm I am unsure why my program doesnt work Ca class=](https://us-static.z-dn.net/files/d24/19621de57c0f74c0b73c5fa631cb3a6d.png)
![At the moment i am tackling the cs50x projects and i need a little bit of help with problem set 1 the greedy algorithm I am unsure why my program doesnt work Ca class=](https://us-static.z-dn.net/files/df9/5c9fa056c0630910cce3978274afba81.png)