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
Klio2033 [76]
3 years ago
15

Compute change

Computers and Technology
1 answer:
Illusion [34]3 years ago
5 0

Answer:

Explanation:

The following code is written in Java and modified to do as requested. It asks the user to enter a number that is saved to the amountToChange and then uses the % operator to calculate the number of 5 dollar bills and the number of 1 dollar bills to give back. A test case has been provided and the output can be seen in the attached image below.

import java.util.Scanner;

class ComputingChange {

   public static void main(String[] args) {

       Scanner scnr = new Scanner(System.in);

       int amountToChange;

       int numFives;

       int numOnes;

       amountToChange = scnr.nextInt();

       numFives = amountToChange / 5;

       /* Your solution goes here */

       numOnes = amountToChange % 5;

       System.out.print("numFives: ");

       System.out.println(numFives);

       System.out.print("numOnes: ");

       System.out.println(numOnes);

   }

}

You might be interested in
Please help me please i really need helpp so i can pass
Alchen [17]

Answer:

Piezoelectric gauge is used to convert charge into measureable electric signal.

Universal serial bus interface allows a computer and flash drive to exchange information.

Analytical balance is used to measure mass

Ultrasonic flow sensors measure the seed of water using ultrasonic waves.

Explanation:

Analytical balance is used to measure mass. An analytical balance is a device that can measure the mass of an object  accurately. It can also measure very small amount of mass with a range between 0.1mg - 0.01mg.

Universal serial bus interface allows a computer and flash drive to exchange information. A Universal Serial Bus (USB) is an interface that allows communication between peripheral devices and a computer. It connects peripheral devices such as mouse, keyboards, printers, scanners, external hard drives and flash drives with the computer.

Piezoelectric gauge is used to convert charge into measureable electric signal. A piezoelectric gauge has a piezoelectric sensor that uses piezoelectric effect to measure changes in pressure, temperature, force and convert these changes into electrical charge.

Ultrasonic flow sensors measure the speed of flowing liquid using ultrasonic waves. It uses sound waves to determine the speed of the liquid.

7 0
3 years ago
The first step in the information processing cycle is _____, which involves entering data into the computer.
Dmitry [639]

Answer:

INPUT

Explanation:

Information Processing Cycle is defined as the series of stages followed in processing information. Those stages include:

  • Input
  • Processing
  • Storage
  • Output

Input involve entering the data/information into the computer

Processing involve the computer performing some computation on the data

Storage involve saving the data and/or result to the any medium for future use.

Output involve displaying or presenting the results to the user.

4 0
3 years ago
What type of information is appropriate for headers and footers? Check all that apply.
lbvjy [14]

Answer:

slide/page number

smart art

maybe date and time

Explanation:

6 0
3 years ago
Read 2 more answers
A debate about city schools are more better than village schools​
Vladimir [108]
No it is not because village school is the traditional education
6 0
3 years ago
The table below describes the planting method used for some vegetables. Which field in this table can you define as the primary
Serjik [45]

Answer:

The vegetables should be named by it's specific name and it's planting method should be written down as well as the time it was planted. The Sr. No. should be there so the person can tell the difference between each plant.

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • The variable sentence stores a string. Write code to determine how many words in sentence start and end with the same letter, in
    13·1 answer
  • Fractures in Earth’s crust where displacement has occurred are called
    13·1 answer
  • Identify the four basic categories of hardware in a microcomputer system. system unit, modem, ram, and microprocessor system uni
    5·1 answer
  • Complete the PizzaCaloriesPerSlice() function to compute the calories for a single slice of pizza. A PizzaCalories() function re
    6·1 answer
  • Path of the signal of television
    6·1 answer
  • What is the meaning of compiler​
    14·1 answer
  • Quick please, URGENT
    12·1 answer
  • Select the correct text in the passage.
    15·1 answer
  • Which of the following techniques is a direct benefit of using Design Patterns? Please choose all that apply Design patterns hel
    12·1 answer
  • Can someone please help me? (,:
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!