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 10:50
A911 dispatcher is the sole sender of messages to all police officers. while on patrol, officers communicate with the dispatcher who, in turn, relays messages to other officers. the officers do not communicate directly with one another. this illustrates a network.
Answers: 1
question
Computers and Technology, 22.06.2019 13:30
Asoftware company hired ray, a college graduate to work in their development team. ray is assigned to work in the coding phase of a project. what happens during the coding phase of a software development project? a. the customer receives a working model of the software. b. developers convert the program design into code. c. developers gather requirements directly from the stakeholders. d. testing teams check the product for quality.
Answers: 1
question
Computers and Technology, 22.06.2019 22:40
In this lab, you complete a python program that calculates an employee's annual bonus. input is an employee's first name, last name, salary, and numeric performance rating. if the rating is 1, 2, or 3, the bonus rate used is .25, .15, or .1 respectively. if the rating is 4 or higher, the rate is 0. the employee bonus is calculated by multiplying the bonus rate by the annual salary.
Answers: 1
question
Computers and Technology, 23.06.2019 08:30
When you interpret the behavior of others according to your experiences and understanding of the world your evaluation is
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
Health, 05.12.2019 17:31
Questions on the website: 13722367