Show Bid Request
Moneytary Unit Conversion
Bid Request Id: 3390
|
|
|
Posted by: |
seatiger74 (25 ratings)
(Software buyer rating 10)
|
Non-action Ratio: |
Very Good - 3.23%
|
Buyer Security Verifications: |
Good
|
Approved on: |
Oct 7, 2001 12:07:16 AM EDT
|
Bidding Closes: |
Oct 21, 2001 12:08:03 AM EDT
|
Viewed (by coders): |
483 times
|
|
|
|
Description:
Consider the table with the monetary units of 11 countries and what each one is worth in U.S dollars Currency Dollar value USA 1.00000 British LB 1.41794 Euro dollar 0.87993 Aust. dollar 0.51896 German mark 0.44990 French Franc 0.13414 Ital. Lira 0.0004544 Jap Yen 0.008087 Russian rouble 0.03406 Korean won 0.0007782 Swiss franc 0.58482
Write a C++ program that allows the user to convert currency from any of the above units to any other. You can have them choose the currency by number(just number the above currencies from 0 to 10, and input an array index into your array of values from the above table.) Choose a "from" currency and a " to" currency and enter the amount to be converted; then print the converted amount to four decimal places and with a string showing the units it is in. Thus Enter from currency: 2(Euro dollars) Enter to currency : 0(us dollars) Enter amount: 100.00 (Euro dollars) (multiply by .87993 and we have) converted amount = 87.9930 us dollars (of course the math is a little different when converting from currency A to currency B where neither one is in US dollars, do the math) Another part of the assignment is to sort the array of currency strings , allowing the values to "tag along". You can use the insertion sort . Using strcmp to compare the strings in the currency array, and if they are out of order you'll need to do the needed operations to "swap" the strings and also to swap the values in the numeric array. To illustrate: To swap doubles x and y you might say tmp = x; x = y; y = temp; //where tmp is a double
But to swap strings (char' C type strings)x and y, it would be strcpy(tmp, x); strcpy (x,y); strcpy (y,tmp); just setting x = y where x and y are char 'pointers only makes both x and y point to the same string -- it doesn't copy the string data over. That is why strcpy is needed here. Using 2 functions , like void dswap(double& x, double& y) and void strswap(char 'x, char 'y ) the idea in sorting is to present the list of currencies to the user in alphabetical order. Do not just initialize the arrays to be in sorted order at the start . use the sort So, you first should sort the arrays and then get into a loop; while(!done) display a menu: show the list of currencies, numbered get input; process and print; go again? (set done appropriately) Do not type in the above as is; it is not a c++ code(most of it isn't)
Deliverables: Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
Special Conditions / Other:
Due Tue 10/9/01
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
This bid was accepted by the buyer!
|
$20 (USD)
|
Oct 7, 2001 1:29:34 AM EDT
|
9.59
(Excellent)
|
|
|
hi...its me...i have started working on ur code...please let me know if the bid is too high.....looking eagerly for ur email...thx..hsvguy |
|
|
|
|
|