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
Amiraneli [1.4K]
3 years ago
15

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 1 dollar bills to variable numOnes, given amountToChange. Hint: Use the % operator.
Computers and Technology
2 answers:
ki77a [65]3 years ago
6 0

Answer:

numOnes = amountToChange % 5;

Explanation:

The modulus operator % returns the remainder after division.

To get the number of dollar bills, you need to know how much remains if you divide by 5. And that is exactly what the above statement does.

Musya8 [376]3 years ago
4 0

A C program that assigns the number of 1 dollar bills:

int main() {

   int amtToChange = 0;

   int numberofFives = 0;

   int numberofOnes  = 0;

   amtToChange = 19;

   numberofFives = amtToChange / 5;  

numberOfOnes = amtToChange % 5;

   cout << "numFives: " << numberofFives << endl;

   cout << "numOnes: " << numberofOnes << endl;

   return 0;

}

The single statement is numberOfOnes = amtToChange % 5

You might be interested in
Which of the following is not a location where text can be entered​
zlopas [31]

Answer:

An integer data type is a location where text cannot be stored

Explanation:

In computer science and computer programming, a data type or simply type is an attribute of data which tells the compiler or interpreter how the programmer intends to use the data.

A data type constrains the values that an expression, such as a variable or a function, might take. This data type defines the operations that can be done on the data, the meaning of the data, and the way values of that type can be stored.

Common examples of data types are

1.Integer: accepts integer numbers

2.Floating-point number: accept decimal numbers

3.Character: accepts character values

4.String. Accepts multiple characters

4.Boolean. Returns true or false logical expression

8 0
3 years ago
What Fortnite skin is more og?
gregori [183]
It’s elite agent i think ??
red nose raider comes out on christmas
7 0
3 years ago
Read 2 more answers
Digital security measures include _____. Select 2 options.
elixir [45]

Answer:

firewalls

passwords

8 0
3 years ago
Read 2 more answers
This is not a question but I am taking a vote of what device most people use​
Xelga [282]

I tend to use a playstation switch. It runs out of data very quickly though, even with the unlimited plan.

5 0
4 years ago
Why do you think you are ready to handle the high school type of education and atmosphere? (in complete sentences)​
sertanlavr [38]

Answer:

I'm already in high school but at first, I was scared for my life literally. It wasn't what I expected it to be, though. Everyone was super nice to me and has been ever since I started. Turns out, high school is amazing.

Explanation:

5 0
3 years ago
Other questions:
  • Some personal computer manufacturers provide a hard disk configuration that connects multiple smaller disks into a single unit t
    6·1 answer
  • Why might location be important when searching for a job?
    10·2 answers
  • A single point of failure is a piece of hardware or application that is key to ________________________.
    8·1 answer
  • What is cutting-edge technology
    6·1 answer
  • Which type of memory helps in reading as well as writing data?
    7·1 answer
  • [5]Suppose a 1,600 kg car is traveling at 20.0 m/s. What average force is needed to stop the car in 4.0 s?
    8·2 answers
  • Which graphic file format is used for commercial purposes.
    10·1 answer
  • The point of (18 ,0) lies on​
    15·2 answers
  • Need answer ASAP
    14·1 answer
  • Type the correct answer in the box. Spell all words correctly. Kenny is designing a document for the employee motivation campaig
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!