#include <iostream>
#include <iomanip>
using namespace std;


// This program will input American money and convert it to foreign currency

// DarC KonQuesT

// Prototypes of the functions
void  convertMulti(float dollars, float& euros, float& pesos);
void  convertMulti(float dollars, float& euros, float& pesos, float& yen);
float convertToYen(float dollars);
float convertToEuros(float dollars);
float convertToPesos(float dollars);
const float euroconv = 1.06;
const float pesoconv = 9.73;
const float yenconv = 124.35;

int main ()


{
	float dollars;
	float euros;
	float pesos;
	float yen;
	
	cout << fixed << showpoint << setprecision(2);

	cout << "Please input the amount of American Dollars you want converted " 
		 << endl;
	cout << "to euros and pesos" << endl;
	cin >> dollars;
	
	//    Fill in the code to call convertMulti with parameters dollars, euros and pesos
	//    Fill in the code to output the value of those dollars converted to both euros and pesos 
	convertMulti(dollars, euros, pesos);
	cout << endl << "$" << dollars << " is converted to " << euros << " euros and " << pesos << " pesos." << endl << endl;	


	cout << "Please input the amount of American Dollars you want converted\n";
	cout << "to euros, pesos and yen" << endl;
	cin >> dollars;
	
	//    Fill in the code to call convertMulti with parameters dollars, euros, pesos and yen
	//    Fill in the code to output the value of those dollars converted to  euros, pesos and yen 
	convertMulti(dollars, euros, pesos, yen);
	cout << endl << "$" << dollars << " is converted to " << euros << " euros, " << pesos << " pesos, and " << yen << " yen." << endl << endl;


	
	cout << "Please input the amount of American Dollars you want converted\n";
	cout << "to yen" <<endl;
	cin >> dollars;
	
	//    Fill in the code to call convertToYen 
	//    Fill in the code to output the value of those dollars converted to yen
	cout << endl << "$" << dollars << " is converted to " << convertToYen(dollars) << " yen." << endl << endl;


	
	cout << "Please input the amount of American Dollars you want converted\n";
	cout << " to euros" << endl;
	cin  >> dollars;
	
	//    Fill in the code to call convertToEuros
	//    Fill in the code to output the value of those dollars converted to euros 
	cout << endl << "$" << dollars << " is converted to " << convertToEuros(dollars) << " euros." << endl << endl;
	

	
	cout << "Please input the amount of American Dollars you want converted\n";
	cout << " to pesos " << endl;
	cin >> dollars;
	
	//    Fill in the code to call convertToPesos
	//    Fill in the code to output the value of those dollars converted to pesos 
	cout << endl << "$" << dollars << " is converted to " << convertToPesos(dollars) << " pesos." << endl << endl;
	
	return 0;
}


// All of the functions are stubs that just serve to test the functions
// Replace with code that will cause the functions to execute properly



//  ************************************************************************
//                           convertMult
//                           
//   task:     This function takes a dollar value and converts it to euros
//             and pesos
//   data in:  dollars
//   data out: euros and pesos
//
//   ***********************************************************************


void  convertMulti(float dollars, float& euros, float& pesos)

{     
	euros = dollars * euroconv;
	pesos = dollars * pesoconv;	
}


//  ************************************************************************
//                           convertMult
//                           
//   task:     This function takes a dollar value and converts it to euros
//             pesos and yen
//   data in:  dollars
//   data out: euros pesos yen
//
//   ***********************************************************************

void  convertMulti(float dollars, float& euros, float& pesos, float& yen)

{
	euros = dollars * euroconv;
	pesos = dollars * pesoconv;
	yen = dollars * yenconv;	
}


//  ****************************************************************************
//                           convertToYen
//                           
//   task:          This function takes a dollar value and converts it to yen
//   data in:       dollars
//   data returned: yen
//
//   ***************************************************************************

float convertToYen(float dollars)

{
	float yen;
	yen = dollars * yenconv;	
	return yen;
}

//  ****************************************************************************
//                           convertToEuros
//                           
//   task:          This function takes a dollar value and converts it to euros
//   data in:       dollars
//   data returned: euros 
//
//   ***************************************************************************
		

float convertToEuros(float dollars)
{
   	float euro;
	euro = dollars * euroconv; 
	return euro;
}

//  *****************************************************************************
//                           convertToPesos
//                           
//   task:          This function takes a dollar value and converts it to pesos       
//   data in:       dollars
//   data returned: pesos
//
//   ****************************************************************************
float convertToPesos(float dollars)

{
	float peso;
	peso = dollars * pesoconv;
	return peso;
}


