Is this supposed to be a true or false question?
An increase in world trade? What are my options?
<span>Here's program. Add your own rate below, I've added commentary where. Try it:
double amount;
string currency;
Dictionary<string, double> factors = new Dictionary<string, double>();
factors.Add("GBP", 1.1111D);
factors.Add("USD", 1.11111D); // here you can add the rate you need
Console.WriteLine("Please enter the amount of Euro you wish to be converted:");
amount = double.Parse(Console.ReadLine());
Console.WriteLine("");
Console.WriteLine("Please choose the currency you wish to convert to:");
Console.WriteLine("USD");
Console.WriteLine("GBP");
Console.WriteLine("");
currency = Console.ReadLine();
double factor;
if (factors.TryGetValue(currency, out factor))
{
Console.WriteLine("You have entered {0} EUR which converts to {1} {2}", amount, amount * factor, currency);
}
else
{
Console.WriteLine("You did not enter a recognised currency {1}", currency);
<span>}</span></span>
This error occurs when the number of arguments sent to the function are not equal ( greater or less ) to the parameters of the function.
For example:
// if the function is
void a_function(int a, int b){
// does some computations
}
// Now when i will call it as
a_function(3);
// Same error as you are getting will occur because the function expects 2 //argements and i am passing one.
Same will happen if i will call it as:
a_function (1,2,3);
Here i am passing one extra argument.
So, i will suggest to count the left function parameters and the arguments you are passing here in this function and you will find the mistake.