You are using a version without Ads of this website. Please, consider donating:

### Functions, so many functions...

Given this code:
 ``123456789101112131415161718192021222324252627282930313233343536`` ``````#include using namespace std; const double GramsPerOunce = 28.35; const double GramsPerTroyOunces = 31.1; const double CurrentValuePerTroyOunceGold = 1744.50; const double FullKarat = 24; int main () { unsigned int Weight; double Grams, TroyOunces, FullValue, Karats, AdjustedValue; cout << "Please enter your weight of Gold in ounces => "; cin >> Weight; cout << endl << endl; cout << "Please enter the Quality of gold in Karats => "; cin >> Karats; cout << endl << endl; Grams = Weight * GramsPerOunce; TroyOunces = Grams / GramsPerTroyOunces; FullValue = TroyOunces * CurrentValuePerTroyOunceGold; AdjustedValue = FullValue * Karats / FullKarat; cout << "Your "<< Weight << " ounces of Gold with a Karat Quality of " << Karats << " is \$" << AdjustedValue << endl << endl; system("pause"); return(0); }``````

I need to modify it's code to include three functions:
1. Get the weight
2. Calculate the value
3. Print the results

What I have so far is... probably not even right.

 ``12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758`` ``````#include using namespace std; const double GramsPerOunce = 28.35; const double GramsPerTroyOunces = 31.1; const double CurrentValuePerTroyOunceGold = 1744.50; const double FullKarat = 24; double GetWeight (double Weight); double CalculateKarats (double Karats); double CalculateValue (); void PrintValue (double AdjustedValue); int main () { CalculateWeight; CalculateKarats; CalculateValue; PrintValue; system("pause"); return(0); } void PrintValue (double AdjustedValue, double Weight, double Karats) { cout << "Your "<< Weight << " ounces of Gold with a Karat Quality of " << Karats << " is \$" << AdjustedValue << endl << endl; } double GetWeight (double Weight) { cout << "Please enter your weight of gold in ounces => " << endl; cin >> Weight; cout << endl << endl; return(Weight); } double CalculateKarats (double Karats) { cout << "Please enter the Quality of gold in Karats => "; cin >> Karats; cout << endl << endl; return(Karats); } double CalculateValue (double Grams, double Karats, double Weight, double TroyOunces, double GramsPerOunce, double GramsPerTroyOunces, double FullValue, double CurrentValuePerTroyOunceGold, double AdjustedValue, double FullKarat) { Grams = Weight * GramsPerOunce; TroyOunces = Grams / GramsPerTroyOunces; FullValue = TroyOunces * CurrentValuePerTroyOunceGold; AdjustedValue = FullValue * Karats / FullKarat; cin >> AdjustedValue; return (AdjustedValue); }``````

I'm especially confused about what to even put in main, which is why it's pretty much empty. Note I haven't learned arrays or any of that awesomeness. It's bare bones C++ here.

Any direction would be highly appreciated.