I am trying to modify some coding that I have already done so that it will read inputs from a text file. The input file contains the choice of the currency and the amount. The program will write the output to another text file instead of display it on the screen.
Below is what I'm and tring to modify..Thanks for your help!!!
#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";
}