Answer to Question #264140 in C++ for mno

Question #264140

A new author is in the process of negotiating a contract for a new suspense 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 variables to store the special values such as royalties rates and fixed royalties.) 


1
Expert's answer
2021-11-10T11:53:12-0500
#include<iostream>
using namespace std;
int main(){
	
	int net;
	
	float royalty1, royalty2, royalty3;
	cout<<"Enter the number of copies:";
	int number_of_copy;
	cin>>number_of_copy;
    cout<<"\nEnter the net price per copy:\n";
    cin>>net;
	royalty1 = 5000 + 20000;
	royalty2 = 0.125 * number_of_copy * net;
	if(number_of_copy>4000){
		royalty3 = 0.1 * 4000 * net + 0.14 *(number_of_copy - 4000) * net ;
		
	}
	else{
		royalty3 = 0.1 * number_of_copy * net;
		
	}
		cout<<"\nRoyalty scheme -1: "<<royalty1;
		cout<<"\nRoyalty scheme -2: "<<royalty2;
		cout<<"\nRoyalty scheme -3: "<<royalty3;
		if(royalty1>royalty2 && royalty1>royalty3){
			cout<<"\nRoyalty scheme -1 is the best option\n";
		}
		else if(royalty2>royalty1 && royalty2>royalty3){
			cout<<"\nRoyalty scheme -2 is the best option\n";
		}
		else if(royalty3>royalty1 && royalty3>royalty2){
			cout<<"\nRoyalty scheme -3 is the best option\n";
		}
		
		return 0;
		
	}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS