Here is an article about calculating pi to 1 million digit in C#, you can narrow it down to 36 digit here is a sample code, I suggest reading the full article and the logic behind it. public static HighPrecision GetPi(int digits) { HighPrecision.Precision = digits; HighPrecision first = 4...
#include <iostream> void hotdog( int weinerspackages, int bunspackages ){ const int weinersPerPackage = 12; const int bunsPerPackage = 8; const int totalweiners = weinerspackages * weinersPerPackage; const int totalbuns = bunspackages * bunsPerPackage; int leftoverweiners = 0; int leftoverbuns = 0; int amountOfHotdogs = 0; if( totalweiners > totalbuns ){...
Addressing edit 4 to your question since through the comments you have come close to a final solution. You should not be adding it to the std namespace, you should add it to one of your own namespace and rely on argument dependent lookup see Is it a good practice...