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
You are purchasing a new printer. Which of the following is the most important requirement?
OlgaM077 [116]

Question↓

You are purchasing a new printer. Which of the following is the most important requirement?

Answer↓

A. Is the printer compatible with your computer's operating system?

If The Printer is Not Compatible With your Computer you will not Be able to Use Therefore, you Will have to buy a New One.

xXxAnimexXx

Hope this Helps! ^ω^

7 0
3 years ago
What are the uses of navigation keys​
Zolol [24]
The navigation keys allow you to move the cursor, move around in documents and webpages, and edit text.
3 0
2 years ago
What is an umbrella of software programs that may include​ CAD/CAM, product​ routing, maintenance, and other product​ concerns?
Andrew [12]

Answer:

Product lifecycle management software

Explanation:

Characteristics.

  • Complete set of tools to establish decision criteria regarding the portfolio and simulations for  product planning.
  • It allows the standardization and automation of the processes of request of alterations in the product, controlling the  decisions, deadlines and ensuring traceability.
  • Improves efficiency in product design.
  • <em>Example SoftExpert PLM </em>is an accessible, easy-to-use and completely web solution for managing the life cycle of  products.
6 0
4 years ago
) Suppose algorithm A takes 10 seconds to handle a data set of 1000 records. Suppose the algorithm A is of complexity O(n2). Ans
Mice21 [21]

Answer:

i) The time taken for 1500 records = 15 seconds.

ii) The time taken for 1500 records = 50 seconds.

Explanation:

A is an O(n) algorithm.

An algorithm with O(n) efficiency is described as a linearly increasing algorithm, this mean that the rate at which the input increases is linear to the time needed to compute that algorithm with n inputs.

From the question, it is given that for 1000 records, the time required is: 10 seconds.

Algorithm time taken is O(n)

Hence,

1) For 1,500 records

=> 10/1000 = x/1500

=> 10x1500/1000 = x

x = 15 seconds

Thus, the time taken for 1500 records = 15 seconds.

2) For 5,000 records

=> 10/1000 = x/5000

=> 10x5000/1000 = x

x = 50 seconds

Thus, the time taken for 1500 records = 50 seconds.

8 0
3 years ago
Which one of the following careers is the most highly resistant to economic change?
Eduardwww [97]

Answer:

Video game designers bbbbbbbbbbbbb

8 0
3 years ago
Other questions:
  • Answer: x = 3<br>#1 -2x + 5 = -31​
    10·1 answer
  • Write a static method named listcountriesoforigin, to be added to the bowl class, which is passed an array of bowl objects, and
    13·1 answer
  • 50 POINTS PLEASE HELP MEEEEEEEEE!!!!!!
    7·2 answers
  • An email message containing a warning related to a non-existent computer security threat, asking a user to delete system files f
    6·1 answer
  • Which of the following statements about federal student loans is true?
    7·1 answer
  • Write a user written function that expects as its input argument a vector of x values and a vector of corresponding y-values. Th
    15·1 answer
  • What information is used in a communication between two system
    10·1 answer
  • def list_length(shrinking_list): ''' A recursive way to count the number of items in a list. ''' if shrinking_list
    10·1 answer
  • A group of users in a small publishing office want to share large image files in a common folder with high availability. Which o
    15·1 answer
  • What code would you use to create the login button?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!