Computers and Technology
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;
}

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 14:30, kodak0531
Which of the following would not be considered a pc? a. mainframe b. desktop c. tablet pc d. laptop
Answers: 2
image
Computers and Technology, 24.06.2019 22:00, sierrawalk2283
True or false technology is often discovered by accident
Answers: 2
image
Computers and Technology, 24.06.2019 23:00, person76
Systolic pressure is a measure of blood pressure when the ventricles relax and fil with blood ture or false
Answers: 1
image
Computers and Technology, 25.06.2019 08:50, adriandehoyos1p3hpwc
98 points asap you have been asked to create a program for an online store that sells their items in bundles of five. select the appropriate code that would display how many bundles are available for sale. a. print(5 // totalitems) b. print(totalitems // 5) c. print(totalitems(5) ) d. print(5(totalitems) )
Answers: 2
Do you know the correct 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, 01.11.2019 03:31
Konu
Mathematics, 01.11.2019 03:31