Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- using namespace std;
- int main()
- {
- int copiesSold;
- double netPrice;
- double royaltyOption1;
- double royaltyOption2;
- double royaltyOption3;
- cout << "Sean Lamb\t" << "Ch04-Ex16\t"
- << "Ch04-Ex16.exe\n" << endl;
- cout << "Enter the number of copies sold: ";
- cin >> copiesSold;
- cout << endl;
- cout << "\n\nEnter the net price of one book: $";
- cin >> netPrice;
- cout << endl;
- royaltyOption1 = 5000 + 20000;
- royaltyOption2 = (copiesSold*netPrice)*1.125;
- royaltyOption3 =
- //else
- //royaltyOption3 = ((copiesSold*netPrice)1.14);
- cout << "____ is the best and the royalty is: $";
- if (royaltyOption1 > royaltyOption2 && royaltyOption1 > royaltyOption3)
- {
- cout << royaltyOption1 << " is the best and the royalty is: $" << royaltyOption1;
- }
- else if (royaltyOption2 > royaltyOption1 && royaltyOption2 > royaltyOption3)
- {
- cout << royaltyOption2 << " is the best and the royalty is: $" << royaltyOption2;
- }
- else if (royaltyOption3 > royaltyOption1 && royaltyOption3 > royaltyOption2)
- {
- cout << royaltyOption3 << " is the best and the royalty is: $" << royaltyOption3;
- }
- cout << "\nRoyalty Option1: $" << royaltyOption1;
- cout << "\nRoyalty Option2: $" << royaltyOption2;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement