Course Solutions Uncategorized (Solved) : Answer Following Question Three Parameters Function Processdisc Needed New Form Program Y Q26644860 . . . .

(Solved) : Answer Following Question Three Parameters Function Processdisc Needed New Form Program Y Q26644860 . . . .

 

After that, answer the followingquestion:
Are all three parameters of the functionprocessDisc(…) needed in this new form of the program?
If yes, justify why (in words).
If no, eliminate the one(s) that is/are not necessary and make allchanges such that the program compiles correctly.

#include <iostream>

#include <string>

using namespace std;

/*

Input:name, unit price, and discount

percentage for a number of products

Output: the discounted price or message

*/

float processDisc(string,float,int);//now the fc returns afloat(discount)

int main()

{

string nameP;

float unitPr,discPr;

int perDisc;

char cont;

cont = ‘Y’;

while (cont == ‘Y’)

{

cout << “Name of product: “;

cin >> nameP;

cout << “Input unit price for ” << nameP << “:”;

cin >> unitPr;

cout << “Input the discount percentage for ”

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post