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
Romashka-Z-Leto [24]
3 years ago
7

Please answer I'm on a timed unit test :)

Computers and Technology
1 answer:
AlexFokin [52]3 years ago
3 0

Answer:

start with what you know

Explanation:

You might be interested in
A cashier distributes change using the maximum number of five-dollar bills, followed by one-dollar bills. Write a single stateme
Allushta [10]

Answer:

<em>num_ones = amount_to_change % 5</em>

Explanation:

It is given that the cashier has to change the money in the maximum number of 5 dollar bills and remaining as $1 bills.

We have to write a single statement of code to assign the value to variable <em>num_ones </em>to find the value of $1 bills given <em>amount_to_change.</em>

<em />

Let us solve this by taking example:

If <em>amount_to_change </em>= $19

Then total number of $5 bills that can be given is 3. And amount that can be given as $5 bills is \bold{3 \times 5  = \$15}

So, the remaining amount i.e. $19 - $15 = $4 will be given as one dollar bills.

Out of these $19, 4 bills of $1 can be found using the <em>Modulus (%) operator.</em>

<em></em>

Modulus operator leaves the remainder i.e.

Output of <em>p % q </em>is the remainder when a number 'p' is divided by 'q'.

19 % 5 = 4

4 is the number of one dollar bills to be given.

So, single line of code for the number of one dollar bills can be written as:

<em>num_ones = amount_to_change % 5</em>

<em />

<em />

Let us try it for <em>amount_to_change  = </em>$30

We know that 6 number of $5 bills can be used to change the amount of $30 and no one dollar bill required.

<em>num_ones = 30 % 5 = </em>0 (because 30 is completely divisible by 5 so remainder is 0)

So, the correct statement is:

<em>num_ones = amount_to_change % 5</em>

4 0
4 years ago
ammy's Seashore Supplies rents beach equipment such as kayaks, canoes, beach chairs, and umbrellas to tourists. Write a program
melomori [17]

Answer:

// Here is SammysRentalPrice.java file

// import package

import java.util.*;

// class definition

class SammysRentalPrice

{

   // main method of the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // object to read value from user

    Scanner scr=new Scanner(System.in);

    // ask to enter rented minutes

       System.out.print("enter rented minutes: ");

       // read minutes

       int min=scr.nextInt();

       // find hours

       int hour=min/60;

       //reamining minutes

       min=min%60;

       // total cost

       int cost=hour*40+min*1;

       // print cost

       System.out.println("total cost is: "+cost);

   }catch(Exception ex){

       return;}

}

}

Explanation:

Read rented minutes from user and assign it to variable "min".Find the hours from minutes and then update the remaining minutes.After this multiply hours with 40 and remaining minutes with 1.Sum them and this will be the cost of rented a sports equipment.

Output:

enter rented minutes: 145

total cost is: 105

8 0
4 years ago
It is a single strand of metal capable of transmitting power or data from one area to<br> another
Lera25 [3.4K]

Answer: A wire

Explanation:

8 0
3 years ago
Which of the following cannot be copyrighted?
Tju [1.3M]
Um.. Where the Answer Choices
8 0
3 years ago
What is the definition of assiduous?
LuckyWell [14K]

Answer:

showing great care and perseverance.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Add a checkbox associated with each label. The first checkbox should have name and id of "likeCats" and be initially checked. Th
    5·1 answer
  • When typing in a cell, hitting Tab will bring which result?
    12·2 answers
  • Select the correct statement about data preparation.
    10·1 answer
  • Which statement is true about the elements of the interface of a presentation program? The status bar appears at the top of the
    14·2 answers
  • If you're able to understand directions more easily when you hear them instead of reading them you are most likely
    12·1 answer
  • Paula needs to ensure that an animation she has created is repeated. Which option should she use to achieve this?
    6·1 answer
  • What advantage does digital storytelling have over oral storytelling traditions?
    6·1 answer
  • PLEASE HELP 98 POINTS!!!!!!!!!!!!!!!!!!
    12·2 answers
  • The sun emits invisible _____&gt; A) electromagnetic waves B) Waves C) Radiation D) Wavelength E) Ultraviolet Light
    8·1 answer
  • Fundamental of Computer Science
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!