You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// For this challenge you will be converting a number from binary to decimal.
// have the function BinaryConverter(str) return the decimal form of the binary value. For example: if 101 is passed return 5, or if 1000 is passed return 8.
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int BinaryConverter(string str) {
int total = 0; // Will determine the decimal total