我想做三个项目来计算然后转换
例子:
item1 + item2 + item3 = `total`
然后,转换total
为沙特里亚尔
// sss.cpp : 定义控制台应用程序的入口点。//
#include "stdafx.h"
#include "iostream"
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
using namespace std;
int main()
{
cout << "conver from US dollar to Saudi ryals" << endl;
double dollars1;
double dollars2;
double dollars3;
double ryals = 3.75;
cout << "Enter the amount of money you would like to transfer item 1" << endl;
cin >> dollars1;
cout << "Enter the amount of money you would like to transfer item 1" << endl;
cin >> dollars2;
cout << "Enter the amount of money you would like to transfer item 1" << endl;
cin >> dollars3;
cout << "US $" << dollars1 + dollars2 + dollars3 << " equals " << ryals * (dollars1 + dollars2 + dollars3) << " Saudi ryals." << endl;
cout << "that's it" << endl;
cin.get();
cin.get();
}