Questions:
Code:
/*On a certain day the British pound was equivalent to $1.487 U.S., the French franc was
$0.172, the German deutschemark was $0.584, and the Japanese yen was $0.00955.
Write a program that allows the user to enter an amount in dollars, and then displays this
value converted to these four other monetary units.
*/
#include<iostream>
#define pound 1.487
#define france 0.172
#define deutschemark 0.584
#define yen 0.00955
#define rs 0.01
using namespace std;
void main()
{
int tempValue =0;
cout<<"Enter an ammount in US Doller = ";
cin>>tempValue;
cout<<"Pound == "<<tempValue/pound<<endl;
cout<<"France =="<<tempValue/france<<endl;
cout<<"deutschemark == "<<tempValue/deutschemark<<endl;
cout<<"Yen == "<<tempValue/yen<<endl;
}
Output
On a certain day the British pound was equivalent to $1.487 U.S., the French franc was
$0.172, the German deutschemark was $0.584, and the Japanese yen was $0.00955.
Write a program that allows the user to enter an amount in dollars, and then displays this
value converted to these four other monetary units.
Code:
/*On a certain day the British pound was equivalent to $1.487 U.S., the French franc was
$0.172, the German deutschemark was $0.584, and the Japanese yen was $0.00955.
Write a program that allows the user to enter an amount in dollars, and then displays this
value converted to these four other monetary units.
*/
#include<iostream>
#define pound 1.487
#define france 0.172
#define deutschemark 0.584
#define yen 0.00955
#define rs 0.01
using namespace std;
void main()
{
int tempValue =0;
cout<<"Enter an ammount in US Doller = ";
cin>>tempValue;
cout<<"Pound == "<<tempValue/pound<<endl;
cout<<"France =="<<tempValue/france<<endl;
cout<<"deutschemark == "<<tempValue/deutschemark<<endl;
cout<<"Yen == "<<tempValue/yen<<endl;
}
Output
0 Questions:
Post a Comment