1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
algol [13]
3 years ago
4

Complete a prewritten C++ program for a carpenter who creates personalized house signs. The program is supposed to compute the p

rice of any sign a customer orders, based on the following facts:
The charge for all signs is a minimum of $35.00.
The first five letters or numbers are included in the minimum charge; there is a $4 charge for each additional character.
If the sign is made of oak, add $20.00. No charge is added for pine.
Black or white characters are included in the minimum charge; there is an additional $15 charge for gold-leaf lettering.

Instructions:

Ensure the file named HouseSign.cppis open in the code editor. You need to declare variables for the following, and initialize them where specified:

A variable for the cost of the sign initialized to 0.00 (charge).
A variable for the number of characters initialized to 8 (numChars).
A variable for the color of the characters initialized to "gold" (color).
A variable for the wood type initialized to "oak" (woodType).
Write the rest of the program using assignment statements and ifstatements as appropriate. The output statements are written for you.
Computers and Technology
1 answer:
alexgriva [62]3 years ago
5 0

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

You might be interested in
How do i divid 521 to the nearest tenth
Softa [21]

Answer:

520

Explanation:

take 521 round that to the nearest 10th and thats 520

8 0
4 years ago
Read 2 more answers
scientist think that two species with homologous structures probably had ____ A. Ancestor B. Fossil C. Environment D. Offspring
Gennadij [26K]
 the answer is  A : ancestor 
8 0
3 years ago
Analyzing computer systems to gather potential legal evidence is computer ________
hodyreva [135]
It is called computer forensics.
5 0
3 years ago
You can use this area to create your resume.
Svetach [21]

Answer:

what area?

Explanation:

if you need help creating a resume lmk :)

all you really need is

your skill set

-what you're good at

-what you can do

-what are you certified at like

excel, Microsoft office etc.

let me know and I'll send an example

3 0
3 years ago
Which of the following would NOT be considered a cause of technological progress?
lyudmila [28]
My best guess would be <span>C. patents. This is because a technological process works with marketing and research, unlike patents. </span><span />
5 0
3 years ago
Other questions:
  • Using commands you learned in lessons 1 and 2. Get your IP address, netmask, DNS hostname, and MAC address. Compare these with y
    5·1 answer
  • Magnetic energy can build up in the atmosphere of the sun. When this energy is finally released, it is 10 million times greater
    15·1 answer
  • How does machine learning help to make modern Web Application Firewalls more effective? (Choose two.)
    5·1 answer
  • Stuck on where to go with this one.
    15·1 answer
  • What is a premium?
    14·2 answers
  • What are the functions of online gaming communities?
    12·1 answer
  • Which flowchart symbol indicates the start or the end of a process?
    8·1 answer
  • The __________ utility has the capability to manage users, create and administer user groups, and apply user rights to those use
    8·1 answer
  • Robert gets home from school at 3 p.M. His mom has to leave for her shift at work at 3:15 and she wants him to watch his baby br
    9·1 answer
  • Which of the following traversals would print all of the elements in the 2D array of integers nums
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!