I needed the help to complete my c++ project. i could not.
I have to grab the percentage from the user input string
it must be in one or more digit followed by decimal followed by one or more digit and followed by % sign
This is what im up to.
#include <cctype> // for character testing functions
#include <string> // to use string objects (variables)
using namespace std;
bool readPercentage(string &percentageStr);
//double percentStrToNum(string percentageStr);
int main ()
string percentageStr = "hello";
cout <<"Ingredient :" <<endl;
cout << boolalpha << readPercentage(percentageStr) << endl;