|
-
June 1st, 2002, 01:09 PM
#1
Currency conversion program
I'm trying to get the following program to convert USDOLLARS to a foreign currency using the conversion rate of 1.53353. Currently the output shows th conversion rate, not the currency amount.
Will someone please tell me what I need to modify to get the program to function?
Thanks,
aircuda
//Currency conversion to calculate US dollars to foreign five foreign currencies.
#include <iostream.h>
#include <iomanip.h>
#include <conio.h>
int main()
{
//declare variables
int USDOLLARS = 1;
float rate = 1.53353;
float conversion;
conversion = USDOLLARS * rate;
//enter input items
cout << "Enter number of US dollars to be converted: ";
cin >> USDOLLARS;
cout << "Conversion: " << conversion << endl;
//calculation
return 0;
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|