English

## Generating the MagicNumber

 250 ffoorr 2015.02.16 17:13 #   I gat it, I'm not sure this is usefull :``` static string  FirstCurr[8]; static string  SecondCurr[8];             FirstCurr[0]  = "USD";         SecondCurr[0] = "USD";         FirstCurr[1]  = "EUR";         SecondCurr[1] = "EUR";         FirstCurr[2]  = "GBP";         SecondCurr[2] = "GBP";         FirstCurr[3]  = "CHF";         SecondCurr[3] = "CHF";         FirstCurr[4]  = "JPY";         SecondCurr[4] = "JPY";         FirstCurr[5]  = "AUD";         SecondCurr[5] = "AUD";         FirstCurr[6]  = "CAD";         SecondCurr[6] = "CAD";         FirstCurr[7]  = "NZD";         SecondCurr[7] = "NZD";                    int a = -1,b=-1;      for( int i =0; i<=7;i++)         {         if( StringSubstr( Symbol(),0,3) ==  FirstCurr[i] )           {           a = i*10;           break;        }}       for( int j =0; j<=7;j++) { if( StringSubstr( Symbol(),3,6) == SecondCurr[j] ) { b = j; break; } }          int mn = a+b;              Print( "magic ", (string) mn); //****************************************************************************** //oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo if (FirstCurr == "USD")r = 0; if (FirstCurr == "EUR")r = 1; if (FirstCurr == "GBP")r = 2; if (FirstCurr == "CHF")r = 3; if (FirstCurr == "JPY")r = 4; if (FirstCurr == "AUD")r = 5; if (FirstCurr == "CAD")r = 6; if (FirstCurr == "NZD")r = 7; if (SecondCurr == "USD")s = 0; if (SecondCurr == "EUR")s = 1; if (SecondCurr == "GBP")s = 2; if (SecondCurr == "JPY")s = 4; if (SecondCurr == "AUD")s = 5; if (SecondCurr == "CAD")s = 6; if (SecondCurr == "NZD")s = 7; int Number = r*10 + s; Print ("MagicNumber is ",(string)Number );       ```