diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2022-09-09 15:22:01 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-09 15:22:01 -0600 |
commit | e2ab34e60f544d9d6902fe3eb8e0947009234955 (patch) | |
tree | 0a93bb11a63e8dc62663925f7f90f41576229dc2 /hw2/convertCurrency.cpp | |
parent | 6ae81ee58a1d2ffa8f8f5fe9dc45a8f064c31c4d (diff) |
Diffstat (limited to 'hw2/convertCurrency.cpp')
-rw-r--r-- | hw2/convertCurrency.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw2/convertCurrency.cpp b/hw2/convertCurrency.cpp index 1d19136..8a31340 100644 --- a/hw2/convertCurrency.cpp +++ b/hw2/convertCurrency.cpp @@ -11,10 +11,10 @@ int main() { int gems = 0, gold = 0, bolts = 0;
cout << "Enter the number of Bolts:\n";
cin >> bolts;
- gold = bolts/23;
- bolts = bolts % 23;
+ gold = bolts/23; // Gets the number of gold coins we can convert
+ bolts = bolts % 23; // Calculates the total umber of bolts you cannot use to convert
gems = gold / 13;
gold = gold % 13;
- cout << gems << " Gem(s) " << gold << " GoldCoin(s) " << bolts << " Bolt(s)";
+ cout << gems << " Gem(s) " << gold << " GoldCoin(s) " << bolts << " Bolt(s)"; // Outputs
return 0;
}
\ No newline at end of file |