📜  货币转换器 c++ 代码示例

📅  最后修改于: 2022-03-11 14:44:53.584000             🧑  作者: Mango

代码示例1
#include 
#include
#include 
using namespace std;
int main()
{
                                                                                                 
double amount,amount2;
string cur2,cur;


cout<<"Which currency do you want to convert\n";

cout<<"the currency are:USD, EURO, PKR, INR, AED: ";

cin>>cur;
  
cout<<"Enter your amount you want to convert: ";
  
cin>>amount;

cout<<"Which currency do you want to convert to\n";

cout<<"The currency are:USD, EURO, PKR, INR, AED: ";

cin>>cur2;

  if(cur=="usd")
{

    
  if(cur2=="euro"){
  amount2=amount*.85;
  cout<