So, i'm trying to figure out the algorithm for detecting egyptian numbers in the array and adding them properly.
I can't seem to understand how to go from here. I can't think of how to add the numbers together because when the user enters " IINNNNNNNN " and wants to subtract " I ", i don't know how i would code that >.>
Code:
void eMath::AddEgyptianNumbers()
{
static char eNumber1[40];
static char eNumber2[40];
struct EgyptianDigit
{
char *EgyptianSymbol;
int EgyptianValue;
};
static const EgyptianDigit EgyptianDigitValue[]=
{
{"Y",1000000},
{"O",100000},
{"/",10000},
{"L",1000},
{"9",100},
{"N",10},
{"I",1},
};
}