Advertisement
Guest User

Convert from euro or yen to dollar c++ program [karim hekal]

a guest
Nov 21st, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.     long euro,yen,pounds;
  6.     int input;
  7.     cout <<"From euro to dollar insert '1' , from yen to dollar insert '2' , From pounds to dollar insert '3'"<<endl;
  8.     cout<<"= ";
  9.     cin>>input;
  10.     if (input==1){
  11.     cout<<"Insert in 'euro' = ";
  12.     cin>>euro;
  13.     cout<<" = "<<euro*1.253;
  14.     }
  15.     else if (input==2){
  16.     cout<<"Insert in 'yen' = ";
  17.     cin>>yen;
  18.     cout<<" = "<<yen*0.00846;
  19.     }
  20.     else if (input==3){
  21.     cout<<"Insert in 'pounds' = ";
  22.     cin>>yen;
  23.     cout<<" = "<<yen*0.13947;
  24.     };
  25.     system("pause > nul");
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement