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
Question 12 There are ____ octets in an IP address.
Marta_Voda [28]
The standard IP convention used in today's network is IPv4. Taking for example one basic IP address we have 192.168.1.1 - The ff IP has 4 octets. An octet is a group of 8 bits on the sample, we have 4 Octets making up 32 a standard 32 bit address.
6 0
4 years ago
A 1 MB digital file needs to transmit a channel with bandwidth of 10 MHz and the SNR is 10 dB. What is the minimum amount of tim
hodyreva [135]

Answer:

A 1 MB digital file needs 0.23 seconds to transfer over a channel with bandwidth 10 MHz and SNR 10 dB.

Explanation:

We can calculate the channel capacity using Shannon's Capacity formula:

C = B + log₂ (1 + SNR)

Where C = Channel Capacity

           B = Bandwidth of the Channel

           SNR = Signal to Noise Ratio

We are given SNR in dB so we need to convert it into a ratio.

SNR_{dB} = 10log₁₀ (SNR)

10 = 10log₁₀ (SNR)

1 = log₁₀ (SNR)

SNR = 10¹

SNR = 10

So, using Shannon Channel Capacity formula:

C = 10 x 10⁶ log₂ (1 + 10)

C = 34.5 MHz

Total amount of time required to transmit a 1MB file:

1MB = 1 x 8 Mbytes = 8Mb

C = 34.5 MHz = 34.5 Mb/s

Time required = 8Mb/34.5Mb/s = 0.23 seconds

A 1 MB digital file needs 0.23 seconds to transfer over a channel with bandwidth 10 MHz and SNR 10 dB.

8 0
3 years ago
Write a program that converts or calculates values. Use the following guidelines to write your program:
Setler [38]

Answer:

In Section 2.2 “Expressing Units”, we showed some examples of how to ... with other units of the same type to get a numerical value that is easier to comprehend. ... The rules of algebra say that you can change (i.e., multiply or divide or add or ... We see that one-half of a yard equals 3/2, or one and a half, feet—something Explanation:

8 0
3 years ago
Consider the following code:
Deffense [45]

Answer:

The output of C is 102.

100 + 1 + 1 = 102

8 0
3 years ago
Companies that have a well-established brand name or reputation in a particular line of business usually want the URLs for their
ICE Princess25 [194]

Answer:

The answer is "True"

Explanation:

In the web browser, when you type and search any name of the company or any brand name so, it will be given the full detail of the company or the specific brand, and it also provides the new collection of the brand. which allows you to buy the product online, that's why we use the URL, that reflects the reputation of a company or the brand.

4 0
3 years ago
Other questions:
  • In a newspaper advertisement for a hybrid car, which of these presentation methods would be most effective
    6·2 answers
  • NEED HELP(10 POINTS) PLEASE HELP MATH
    8·2 answers
  • If a suspect is not read his or her Miranda rights, then nothing the suspect says can be used at trial, even if the suspect volu
    11·1 answer
  • Raj’s computer just crashed and he lost most of his files. What should he do to avoid this problem in the future?
    10·2 answers
  • A given application written in Java runs 15 seconds on a desktop processor. A new Java compiler is released that requires only 0
    9·1 answer
  • Katla is a project manager. One of the programmers on her team comes to her and says that he permanently deleted some code mista
    5·1 answer
  • I want to solve this question
    5·1 answer
  • What is role can ICT play in helping school take part in social responsibility
    14·1 answer
  • Heeeeeeelp :)<br><br> hwjkwdlfo;pk
    8·1 answer
  • Which of the following operating systems would allow a user to add functionality and sell or give away their versions?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!