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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 07:00
Idon understand these and need some ! ?
Answers: 2
question
Computers and Technology, 22.06.2019 11:00
Which law requires employers to provide safe working environments for their employees? a. civil rights act b. fair labor standards act c. occupational safety and health act d. wagner act
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
To produce a starlight effect in her photograph, lina should choose the filter for her camera.
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
Which is a possible benefit of having a good credit history? having a checking account low interest rate on a car loan high interest rate on a credit card offer bankruptcy
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
question
Mathematics, 14.10.2019 16:10
Questions on the website: 13722361