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
Aleonysh [2.5K]
3 years ago
8

A cashier distributes change using the maximum number of five dollar bills, followed by one dollar bills. For example, 19 yields

3 fives and 4 ones. Write a single statement that assigns the number of one dollar bills to variable numOnes, given amountToChange. Hint: Use the % operand.
Sample program:
#include
int main(void) {
int amountToChange = 0;
int numFives = 0;
int numOnes = 0;
amountToChange = 19;
numFives = amountToChange / 5;

printf("numFives: %d\n", numFives);
printf("numOnes: %d\n", numOnes);
return 0;
Computers and Technology
1 answer:
posledela3 years ago
6 0

Answer:

The correct program to this question as follows:

Program:

//header file

#include <stdio.h> //include header file for using basic function

int main() //defining main method

{

int amountToChange=19,numFives,numOnes; //defining variable

numFives = amountToChange/5; //holding Quotient  

numOnes = amountToChange%5; //holding Remainder

printf("numFives: %d\n", numFives); //print value

printf("numOnes: %d\n", numOnes); //print value

return 0;

}

Output:

numFives: 3  

numOnes: 4  

Explanation:

In the above program first, a header file is included then the main method is declared inside the main method three integer variable is defined that are "amountToChange, numFives, and numOnes", in which amountToChange variable a value that is "19" is assigned.

  • Then we use the numFives and the numOnes variable that is used to calculate the number of 5 and 1 , that is available in the amountToChange variable.
  • To check this condition we use (/ and %) operators the / operator is used to hold Quotient value and the % is used to hold Remainder values and after calculation prints its value.

You might be interested in
Do you think people are willing to buy these products? Why?
SSSSS [86.1K]
What products ma’am/sir
3 0
3 years ago
Read 2 more answers
How does an ip address allow your computer to be reached
LiRa [457]
Not sure if this helps

The "IP" part of IP address stands for "Internet Protocol." The "address" part refers to a unique number that gets linked to all online activity you do...somewhat like a return address on a letter you'd send out. (All this happens in milliseconds.)
Your computer is hooked up to the Internet, one way or the other. When you go online for email, to shop or chat, your request has to be sent out to the right destination, and the responses and information you want need to come back directly to you.

An IP address plays a significant role in that.

You and your computer actually connect to the Internet indirectly: You first connect to a network that is 1) connected to the Internet itself and 

8 0
3 years ago
Which is an operational process performed by AWS for data security? a.Background virus scans of EBS volumes and EBS snapshots
Tresset [83]

Answer:

B. All decommissioned magnetic storage devices are degaussed and physically destroyed in accordance with industry-standard practices.

Explanation:

6 0
3 years ago
Unless you specify otherwise, excel summarizes data by ____.
Lilit [14]
Unless you specify otherwise, excel summarizes data by  summing numeric data and counting data fields containing text.
<span> The most commonly used ways to </span><span>summarize data in excel are: pivot tables, autosum, sort, selection....
</span>
4 0
3 years ago
Which of the following is one of the first steps in implementing a comprehensive security program? Setting up a Guest account Cr
yKpoI14uk [10]

Answer:

Setting a strong password policy

Explanation:

In implementing a comprehensive security program, one of the first steps would be to set up a strong password policy.

It is important to understand what the company is trying to protect from third parties.

Setting up a password policy is going to increase the security of the system through the use of strong passwords.

5 0
3 years ago
Other questions:
  • Which device should be used for enabling a host to communicate with another host on a different network?
    9·1 answer
  • What type of electronic monitoring involves an offender being contacted periodically by telephone or beeper to verify his or her
    5·1 answer
  • Which of the following is NOT true about variables?
    13·1 answer
  • The availability of the appropriate compiler guarantees that a program developed on one type of machine can be compiled on a dif
    9·1 answer
  • What is a DreamScape?<br> Explain <br> and give example (if you want)
    10·1 answer
  • To adjust the margins on a page, users will navigate to the _____ tab.
    13·2 answers
  • Using the _______ list, you can select the number of photos that will appear on each slide.
    10·2 answers
  • Write code that prompts for three integers, averages them, and prints the average. Make your code robust against invalid input;
    7·1 answer
  • What is a trojan horse in computer science?
    15·1 answer
  • Bad Directions You are driving to your friend’s house and are using your smartphone for directions. While approaching your desti
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!