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

Need in C++ 25 - A new author is in the process of negotiating a contract for a

ID: 3567297 • Letter: N

Question

Need in C++

25 - 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 4000 copies sold, and 14% of the net price for the copies sold over 4000. The author has some idea about the number of copies that will be sold and would like to have an estimate of the royalties 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 royalties rates and fixed royalties.)

Explanation / Answer

#include<iostream>

using namespace std;

int main(){
float price;
int no_of_copy;
float royalty1 = 0, royalty2 = 0,royalty3 = 0;
cout << "Enter Net price of each copy: $";
cin >> price;

cout << "Enter estimated number of copies to be sold: ";
cin >> no_of_copy;

royalty1 = 5000 + 20000;
royalty2 = (0.125 * price)* no_of_copy;
if(no_of_copy > 4000){
royalty3 = (0.10 * price)*4000 + (0.14 * price) * (no_of_copy - 4000);
}else{
royalty3 = (0.10 * price) * no_of_copy;
}

cout << "Royalty Under option 1 : $" << royalty1 << endl;
cout << "Royalty Under option 2 : $" << royalty2 << endl;
cout << "Royalty Under option 3 : $" << royalty3 << endl;

if(royalty1 > royalty2 && royalty1 > royalty3){
cout << "option 1 is the best" << endl;
}else if(royalty2 > royalty1 && royalty2 > royalty3){
cout << "option 2 is the best" << endl;
}else{
cout << "option 3 is the best" << endl;
}
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