subject
Computers and Technology, 19.08.2021 21:40 Jasten

A new author is in the process of negotiating a contract for a new romance novel. The publisher is offering three options. In the first option, the author is paid $5,000 upon delivery of the final manuscript and $20,000 when the novel is published.
In the second option, the author is paid 12.5% of the net price of the novel for each copy of the novel sold.
In the third option, the author is paid 10% of the net price for the first 4,000 copies sold, and 14% of the net price for the copies sold over 4,000.
The author has some idea about the number of copies that will be sold and would like to have an estimate of the royal- ties generated under each option.
Write a program that prompts the author to enter the net price of each copy of the novel and the estimated number of copies that will be sold. The program then outputs the royalties under each option and the best option the author could choose. (Use appropriate named constants to store the special values such as royalty rates and fixed royalties).
Since your program handles currency, make sure to use a data type that can store decimals with a decimal precision of 2.
The bottom is what I have right now, but every time I input 120 and 22.99 my outputs are 344.8, 275.8, Option 1 is the best, but I also need it to output 25000.0 as well? so is the code incorrect in a specific area? Please Help!
#include
using namespace std;
int main() {
double option1, option2, option3, copiesSold, priceperCopy, tenPercent=0, fourteenPercent=0;
double finalManu, published;
cout<<"Enter price of each copy: ";
cin>>priceperCopy;
cout<<"Estimated number of copies sold: ";
cin>>copiesSold;
finalManu = 5000, published = 20000;
if (copiesSold <= 4000)
tenPercent = (priceperCopy * copiesSold) * 0.1;
if (copiesSold > 4000)
fourteenPercent = ((priceperCopy * copiesSold) - 4000) * 0.14;
option1 = finalManu + published;
option2 = (priceperCopy * copiesSold) * 0.125;
option3 = tenPercent + fourteenPercent;
cout<<"\n";
cout<<"Royalties under option 1:\n$"< cout<<"$"< cout< cout<<"\n";
cout<<"Royalties under option 2:\n";
cout<<"12.5% of the net price of the novel for "< cout<<"Total is $"< cout< cout<<"\n";
cout<<"Royalties under option 3:\n"< cout<<"Total is $"< cout< cout<<"\n";
if(option1 > option2 && option1 > option3)
cout<<"Option 1 is the best option you can choose for maximum royalties.\n";
if(option2 > option1 && option2 > option3)
cout<<"Option 2 is the best option you can choose for maximum royalties.\n";
if(option3 > option1 && option3 > option2)
cout<<"Option 3 is the best option you can choose for maximum royalties.\n";
return 0;
}

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 06:30, arguellesjavier15
Who can provide you with a new password when you have forgotten your old one? your provide you with a new password in case you forget your old one.
Answers: 3
image
Computers and Technology, 23.06.2019 07:30, kimhoss2
What are ways to switch windows in excel? check all that apply. on the status bar, click the windows button, and then click the file name. on the task bar, click to display the excel jump list, and then click the file name. on the view tab, in the window group, click switch windows, and then click the file name. on the review tab, in the viewing group, click files, and then click the file name.
Answers: 1
image
Computers and Technology, 24.06.2019 11:30, nate1808
What does the https: // mean when you type in a website
Answers: 1
image
Computers and Technology, 24.06.2019 18:30, kristine2424
Is a type of bullying that takes place when a person intentionally posts negative information about another that is not true
Answers: 1
You know the right answer?
A new author is in the process of negotiating a contract for a new romance novel. The publisher is o...

Questions in other subjects:

Konu
Mathematics, 19.10.2019 04:10
Konu
Mathematics, 19.10.2019 04:10