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
Kisachek [45]
2 years ago
6

Write a program that tells what coins to give out for any amount of change from 1

Computers and Technology
1 answer:
ipn [44]2 years ago
5 0

Answer:

#include<iostream>

using namespace std;

void computeCoin(int coinValue, int& number, int& amountLeft)

{

number = amountLeft / coinValue;

amountLeft = amountLeft % coinValue;

}

int main()

{

int cents;

int number;

char ch;

do

{

cout << "Enter no of cents. :";

cin >> cents;

while(cents<1 || cents >99)

{

cout << "Invalid cents entered. Re-Enter no of cents. :";

cin >> cents;

}

cout << cents <<" can be given as ";

computeCoin(25,number,cents);

if(number)

cout << number << " quarters ";

computeCoin(10,number,cents);

if(number)

cout << number << " dimes and ";

cout << cents << " penny"<<endl;

cout<< "do u want to continue enter y or n :";

cin >> ch;

}while(ch=='y');

return 0;

}

Explanation:

You might be interested in
Edhesive 9.10 Question 3
Ede4ka [16]

Answer:

your on unit 9 of edhesive?

Explanation:

5 0
3 years ago
Read 2 more answers
PLZ ANSWER ALL MY QUESTION. Which line of code will display the variable num rounded to the nearest tenth?
zavuch27 [327]

Answer:

A

Explanation:

5 0
3 years ago
Martha is a network monitoring technician working on a firewall for her company’s network. To filter traffic going through the f
tia_tia [17]

Answer:

D

Explanation:

Not much of a tech person, but protocol then firewall seems the most reasonable.

7 0
3 years ago
Read 2 more answers
Write a program that allows the user to play a guessing game. The game will choose a "secret number", a positive integer less th
Burka [1]

Answer:

// This program is written in C++

// Comments are used for explanatory purpose

// Program starts here

#include<iostream.h>

#include<stdlib.h>

int main()

{

// Declare variables

int num, selectno;

string status;

randomize();

//Generate random number;

num=rand()%10000;

// Prompt to guess a number

cout<<"You have only 10 tries\nTake a guess: ";

int tries = 0;

while (tries != 10)

{

cin>>selectno;

if(selectno == num){

cout<<"You passed at the "<<count+1<<" attempt";

tries = 10;

}

else

{

cout<<"You failed. Take another guess\n You have "<<10 - count + 1 <<" attempts";

}

tries++;

if(tries >= 10)

{

break;

}

}

return 0;

}

8 0
3 years ago
Write a paragraph expressing how you'd use the computer to enhance your place of work.​
Charra [1.4K]

Answer:

Have water by, have it organized, and have notes by you welcome.

Explanation:

4 0
3 years ago
Other questions:
  • That is Entrepreneur ? ?<br>​
    8·1 answer
  • What is the local portion of the e-mail address below? <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="
    14·1 answer
  • What is the most efficient way to include a space after each paragraph
    9·1 answer
  • What is the output of the following program? #include using namespace std; class TestClass { private: int val; void showVal() {
    5·1 answer
  • In windows, a(n) ________ follows the file name and a period and indicates the file type.
    9·1 answer
  • When authenticating a user's password, the password supplied by the user is authenticated by comparing the ____ of the password
    11·1 answer
  • With a heat exchanger, the temperature of the process fluid can be measured with a temperature-
    14·1 answer
  • B) The company's chief financial officer recognizes the need for an upgrade to the smart watches, but does not understand why th
    8·1 answer
  • Which type of programming language translates one line of code at a time and then executes it before moving to the next line?
    5·2 answers
  • Try using the index method yourself now! Using the index method, find out the position of "x" in "supercalifragilisticexpialidoc
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!