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
anyanavicka [17]
3 years ago
10

Write a program with total change amount as an integer input that outputs the change using the fewest coins, one coin type per l

ine. The coin types are dollars, quarters, dimes, nickels, and pennies. Use singular and plural coin names as appropriate, like 1 penny vs. 2 pennies.
Ex: If the input is:
0
or less, the output is:
no change
Ex: If the input is:
45
the output is:
1 quarter 2 dimes
Your program must define and call the following function. Positions 0-4 of coinVals should contain the number of dollars, quarters, dimes, nickels, and pennies, respectively.
void ExactChange(int userTotal, vector& coinVals)
#include
#include
using namespace std;
void ExactChange(int userTotal, vector& coinVals) {
if (penny == 1) {
cout << penny << "penny" << endl;
}
if (penny > 1) {
cout << penny << "pennies" << endl;
}
if (penny == 0) {
cout << "no change" << endl;
}
}
/* Define your function here */
int main() {
int inputVal;
vector changeAmount(5);
cin >> inputVal;
ExactChange(inputVal, changeAmount);
/* Type your code here. Your code must call the function. */
return 0;
}
Please help me with this problem using c++.
Computers and Technology
1 answer:
Pie3 years ago
6 0

Answer:

001122334455667788991010111213141516171819

Explanation:

You might be interested in
a rule that states each foreign key value must match a primary key value in the other relation is called the
makvit [3.9K]

Answer:

Referencial Integrity Contraint

Explanation:

The referential integrity constraint states that the customer ID i.e (CustID) in the Order table must match a valid CustID in the Customer table. Most relational databases have declarative referential integrity. That is to say, when the tables are created the referential integrity constraints are set up so as to maintain the quality of information.

3 0
3 years ago
One random part of Chess is whether the white side or the black side moves first? A. True B. False
ohaa [14]
The correct answer is B. false.
Determining which color goes first is not random at all - it is a rule in chess that the White player will always start the game first, and will then be followed by the Black player. 
5 0
3 years ago
Read 2 more answers
Casual or informal group meetings are common. Here youcasually chat over tea, meet after work, or get together for purelysocial
SCORPION-xisa [38]

Answer: True

Explanation:

Yes, it is true that the informal or the casual meetings are very common and you can chat over tea with your friends and colleagues and meet with your childhood friends in purely social meeting. Informal meetings are basically planned for relaxation your mind and mood other than formal business meetings. It does not have any agenda like the formal business meetings.

3 0
3 years ago
Which command executed in Windows PE would transfer both the files and directory structure from one device to another device or
EleoNora [17]

Answer:

xcopy

Explanation:

xcopy (which stands for extended copy) command, was created to have several functions and ability to copy one or more folders, files or an entire directory from one location to another. It is more powerful than copy command that was seen in the first set of operating systems. It is currently being built into desktop operating systems and Microsoft windows server.

6 0
3 years ago
Write a structure declaration to hold the following data about a savings account: Account Number (string object) Account Balance
Citrus2011 [14]

Answer:

Explanation:

The following is written in C and creates a structure declaration named savingsAccount and adds all of the values into it as defined in the question.

struct savingsAccount {

char AccountNumber[] = "";

double AccountBalance;

double InterestRate;

double AverageMonthlyBalance;

}

4 0
3 years ago
Other questions:
  • Write a program that calculates an adult's fat-burning heart rate, which is 70% of 220 minus the person's age. Complete fat_burn
    10·1 answer
  • Question: A famous Disney Movie partially takes place in this city.
    15·2 answers
  • Purpose Your goal is to create a design for a software interface. You will experience the scope of the design process from brain
    7·1 answer
  • What do you call the physical, touchable, materials parts of a computer system?
    7·1 answer
  • What is the difference between edge and core networks?
    13·1 answer
  • What is SoC? how is it different from CPU?
    14·1 answer
  • How did imperialism lead to WWI? A The debate of the morality of imperialism created tensions around Europe b Native people were
    12·1 answer
  • Which tab on the ribbon in the folder window allows users to change how the contents of the folder are being shown?
    11·1 answer
  • Your friend decides to create a spreadsheet containing vocabulary terms and their definitions to help prepare for the unit test
    5·1 answer
  • What is the difference between turn-based game mode and point-based game mode?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!