Please help me!!

This is a discussion on Please help me!! within the C++ Programming forums, part of the General Programming Boards category; I just did formula to convert foriegn currency into US dollars below. #include<iostream.h> double amount = 0.0; /*Stores user input*/ ...

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

    Please help me!!

    I just did formula to convert foriegn currency into US dollars below.

    #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";

    }

    Now I am trying to write code for a menu (displayed as a loop) that allows users to choose which currency and the amount of the foreign currency they wish to convert to US dollars. Function(s) (besides main()) must be used.

  2. #2
    Registered User
    Join Date
    Dec 2001
    Posts
    421
    1) Use code tags when pasting code
    2) When you create a new post, put something more descriptive than "Please help me" in the title
    3) Dont' come here expecting people to do your homework for you
    4) If you dont know how to do something, search the internet first, and have a go at it yourself. if you can't figure it out, come here and ask SPECIFIC questions about the problems you are having with your implementation... and THEN people will help.

    If you read your post, you'll see you haven't actually asked a question, you have just expected people to do your work for you.

    U.
    Quidquid latine dictum sit, altum sonatur.
    Whatever is said in Latin sounds profound.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21