aircuda
June 1st, 2002, 01:09 PM
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;
}
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;
}