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, 23.06.2019 12:00
From excel to powerpoint, you can copy and paste a. cell ranges and charts, one at a time. b. cell ranges and charts, simultaneously. c. charts only. d. cell ranges only.
Answers: 3
question
Computers and Technology, 23.06.2019 20:30
1. for which of the following are you not required to signal beforehand? a. changing lanes b. speeding up c. stopping
Answers: 2
question
Computers and Technology, 24.06.2019 00:50
Which player type acts on other players? a. killer b. achiever c. explorer d. socializer
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
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, 24.09.2020 06:01
question
History, 24.09.2020 06:01
question
Mathematics, 24.09.2020 06:01
question
Chemistry, 24.09.2020 06:01
question
Mathematics, 24.09.2020 06:01
question
Mathematics, 24.09.2020 06:01
question
Mathematics, 24.09.2020 06:01
question
Chemistry, 24.09.2020 06:01
question
Mathematics, 24.09.2020 06:01