Thread: Need Your Assistnace

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    15

    Need Your Assistnace

    I have written code to convert foreign currency into US dollars. Now I am trying to write code for a menu (display using loop) that allows the user to choose which currency and the amount of the foreign currency they wish to convert to US dollars. I am using Function(s) must be used. Below is what I have so far!

    #include<iostream.h>

    double amount = 0.0; /*Stores user input*/

    int main()
    {
    cout<<"Currency Conversion"<<endl;

    cout<<"--------------------\n";

    cout<<"Enter the amount in US Dollar: "; /*Prompt user for amount*/

    cin>>amount; /* Read in the amount*/

    /*Convert the amount to each currency type and print it out*/

    cout<<amount<<" US Dollars = "<<amount/0.6072<<" Swiss Francs\n";
    cout<<amount<<" US Dollars = "<<amount/1.4320<<" British Pounds\n";
    cout<<amount<<" US Dollars = "<<amount/0.0081<<" Japanese Yens\n";
    cout<<amount<<" US Dollars = "<<amount/0.6556<<" Canadian Dollars\n";
    cout<<amount<<" US Dollars = "<<amount/0.8923<<" Euros\n";

    }

  2. #2
    Seeking motivation... endo's Avatar
    Join Date
    May 2002
    Posts
    537

    Question

    Is there a question in this somewhere?

  3. #3
    Registered User billholm's Avatar
    Join Date
    Apr 2002
    Posts
    225

    Question

    What type of menu system do you want?

    The "look-over-and-select-the-number" type or something much more polished?
    All men are created equal. But some are more equal than others.

    Visit me at http://www.angelfire.com/my/billholm

  4. #4
    Registered User billholm's Avatar
    Join Date
    Apr 2002
    Posts
    225
    All men are created equal. But some are more equal than others.

    Visit me at http://www.angelfire.com/my/billholm

Popular pages Recent additions subscribe to a feed