CSharp - Write program to Convert euro to dollar

Requirements

Performing simple economic calculations for currency conversions,

Read an amount in euros and the euro exchange rate, you will convert the amount to dollars.

Demo

using System;
class Program/*from  www  .j av  a2s . co  m*/
{
    static void Main(string[] args)
    {
        // Inputs 
        Console.Write("Enter amount in euros: ");
        string inputEuros = Console.ReadLine();
        double amountEuros = Convert.ToDouble(inputEuros);

        Console.Write("Enter euro exchange rate (how many dollars per 1 euro): ");
        string inputExchangeRate = Console.ReadLine();
        double euroEchangeRate = Convert.ToDouble(inputExchangeRate);

        // Calculation 
        double amountDollars = amountEuros * euroEchangeRate;

        Console.WriteLine("Amount in dollars: " + amountDollars);
    }
}

Result