Respuesta :
Answer:
#include <iostream>
#include <string>
using namespace std;
int main()
{
double charge = 0.00;
int numChars = 8;
string color = "gold";
string woodType = "oak";
if(numChars > 5){
charge += (numChars - 5) * 4;
}
if(woodType == "oak"){
charge += 20;
}
if(color == "gold"){
charge += 15;
}
charge += 35;
cout << "The charge is: $" << charge << endl;
return 0;
}
Explanation:
Include the string library
Initialize the variables as specified
Check if the number of characters is greater than 5 or not. If it is, add 4 to the charge for each character that is greater than 5
Check if the sign is made of oak or not. If it is, add 20 to the charge
Check if the color is gold or not. If it is, add 35 to the charge
Add the minimum cost to the charge
Print the charge
In this exercise we have to use the knowledge of the C++ language to write the code, so we have to:
The code is in the attached photo.
So to make it easier the code can be found at:
#include <iostream>
#include <string>
using namespace std;
int main()
{
double charge = 0.00;
int numChars = 8;
string color = "gold";
string woodType = "oak";
if(numChars > 5){
charge += (numChars - 5) * 4;
}
if(woodType == "oak"){
charge += 20;
}
if(color == "gold"){
charge += 15;
}
charge += 35;
cout << "The charge is: $" << charge << endl;
return 0;
}
See more about C++ at brainly.com/question/26104476