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
This common technique, employed at the edge of a network, eliminates the need for public IP addresses on a private network while
NNADVOKAT [17]

Answer:

NAT

Explanation:

Network Address Translation (NAT) allows nonroutable IP prefixes to hide behind a routable address.it translates IP addresses and ports of its internal hosts, hiding the true endpoint of an internal host on a private network.

Using NAT in this way allows network engineers to efficiently route internal network traffic to the same resources, and allow access to more ports, while restricting access at the firewall.

4 0
3 years ago
is defined as the condition in which all of the data in the database are consistent with the real-world events and conditions
-BARSIC- [3]

\boxed{Data \:anomaly} is defined as the condition in which all of the data in the database are consistent with the real-world events and conditions.

\red{\large\qquad \qquad \underline{ \pmb{{ \mathbb{ \maltese \: \: Mystique35}}}}}

3 0
3 years ago
Many computer programs contain ____ that detail the specific instructions a computer should perform (in a specific order) to car
nikklg [1K]

Answer:

Algorithms.

Explanation:

Computer system is an electronic machine that receives input data, processes or executes these data and outputs the results. It comprises of two parts, the hardware and software components.

The computer receives data created by a process and inputted by individuals. The software components are the operating system and the application softwares running in the operating system. The application software follows a well defined stages of task to execute a task. This is called algorithm.

The application uses the algorithm to execute the task on the input data to give the required result.

8 0
3 years ago
Computers were originally invented to
Afina-wow [57]

Answer:

B

Explanation:

It's B because why would it me made to play video games

5 0
3 years ago
Read 2 more answers
Green computing can be achieved by: a. using video conferencing, electronic meeting systems, and groupware. b. replacing meeting
Rama09 [41]

Answer: using video conferencing, electronic meeting systems, and groupware

Explanation:

Green computing simply means the use of computer in a way that's environmental friendly.

One way to achieve this is through using video conferencing, electronic meeting systems, and groupware. This allows the use of computers not to have a negative effect on the environment.

4 0
3 years ago
Other questions:
  • After doing the route tracing to a particular IP addresses, paste the path of IP addresses that were taken from your IP address
    13·1 answer
  • A multistep protocol used to identify and control potential threats to food-safety is the
    8·1 answer
  • Which process is used for sending invitations to players to start a game?
    9·2 answers
  • Both k-means and k-medoids algorithms can perform effective clustering. (a)Explain the strength and weakness of k-means in compa
    5·1 answer
  • True or false: a game design document is like a diary for game developers
    13·2 answers
  • __________ is a contemporary term for data and software tools for organizing, analyzing, and providing access to data to help ma
    6·1 answer
  • In Microsoft Word you can access _ the command to the mini toolbar
    14·2 answers
  • Which will touch the ground first an elephant or a rock?
    9·2 answers
  • Which of these parts of a computer produces an observable result?
    11·2 answers
  • Cookie Snooping
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!