Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A new author is in the process of negotiating a contract for a new romance novel

ID: 3765708 • Letter: A

Question

A new author is in the process of negotiating a contract for a new romance novel. The publisher is offering several options:


a. The author is paid $5000 on delivery of the manuscript to the publisher and another
$20,000 when the novel is finally published.
b. The author is paid 12.5% of the book price every time the book is sold.
c. The author is paid 10% of the book price every time a hook is sold for the first 4000
copies and 14% of the price of every book after the first 4000.
cl. The ar-author is paid l2%, of the book price every time a book is sold for the first 4000
copies, and l4% of the price of every book after the first 4000.
e. The author is paid a flat fee of $ 12,000 on a delivery of the manuscript to the publisher.
The author has some idea of the numbers of copies that can be sold and would like to estimate her royalties for each book sale.


Write a program that prompts the author to enter the book price of each novel and the best estimate of the number of books that be sold, The program will output the expected dollar amount from each of the 5 options and finally it will display the value of the best option.


This program will be able to accept new input and recalculate and display results without restarting the program. A11 input values will be validated!

Explanation / Answer

Please find the program in C++ as per the requirement:

#include <iostream>
using namespace std;
int main()
{
float option[5],price,max;
int i,k,indicator,num;
  
cout<<"Please enter the book price of the Novel or '0' to Quit: ";
cin>>price;
while(price!=0){
if (price>0){
cout<<"Please enter the best estimate of the number of books that be sold: ";
cin>>num;
if (num<=0){
cout<<"Invalid input,exiting the program"<<endl;
break;
}
  
option[0]=5000+20000;
option[1]=num*(price*0.125);
if (num>4000){
option[2]=4000*(price*0.1)+(num-4000)*(price*0.14);
option[3]=4000*(price*0.12)+(num-4000)*(price*0.14);
}
else{
option[2]=num*(price*0.1);
option[3]=num*(price*0.12);
}
k=97;
option[4]=12000;
for(i=0;i<5;i++){
  
cout<<"Expected dollar amount from Option "<<static_cast<char>(k+i)<<" is: $"<<option[i]<<endl;
if (i==0){
max=option[i];
indicator=i;
}
else{
if(option[i]>max){
max=option[i];
indicator=i;
}
}
}
k=97;
cout<<"Best option is Option "<<static_cast<char>(k+indicator)<<" : $"<<option[indicator]<<endl;
cout<<endl;
}
  
cout<<"Please enter the book price of the Novel or '0' to Quit: ";
cin>>price;
  
}
  

return 0;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote