网易游戏天下3藏宝阁金币转换计算器

本简单程序可实现为网易游戏-天下3藏宝阁金币交易与游戏内金币寄售差额计算。用户可以使用本程序快速计算出通过从其他点卡平台(如:拍拍,淘宝)购买点卡寄售换取金币和网易游戏官方交易平台藏宝阁出售金币之间的差额,从而判断使用RMB通过几次转换以后是否能获取利润。

源码如下:

#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
 double pointCard;   //寄售点卡总计点数
 double amount;      //购买点卡总计花费
 double consignment;   //100点卡寄售价格
 double goldCoinPrice;       //藏宝阁出售金币花费
 double goldCoinQuantity;    //藏宝阁出售金币数量
 int    count;   //寄售点卡次数
 double buy;
 double sale;
 double profit;
 cout<<"请输入所充值点卡面值(单位:点):";
 cin>>pointCard;
 cout<<"请输入所充值点卡金额(单位:元):";
 cin>>amount;
 cout<<"请输入100点点卡寄售价(单位:金):";
 cin>>consignment;
 cout<<"请输入藏宝阁出售数目(单位:金):";
 cin>>goldCoinQuantity;
 cout<<"请输入藏宝阁出售金额(单位:元):";
 cin>>goldCoinPrice;
 cout<<"请输入点卡寄售次数(单位:次):";
 cin>>count;
 buy=((pointCard-count)/amount)*(consignment/101.0);//1元RMB能从寄售购买的金币数目(以100点为基数进行计算)
 cout<<"1元RMB能从寄售购买的金币数目(以100点为基数进行计算)"<<buy<<endl;
 sale=((goldCoinQuantity+5.0)/(goldCoinPrice*0.95)); //1元RMB能从藏宝阁卖出的金币数目
 cout<<"1元RMB能从藏宝阁卖出的金币数目"<<sale<<endl;
 profit=sale-buy;
 cout<<"本次交易共盈利金币数目为:"<<profit<<endl;
 system("PAUSE");
 return 0;
}

原文地址:https://www.cnblogs.com/aceboy/p/2458879.html