Compute change
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 % operator.
import java.util.Scanner;
public 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 */
System.out.print("numFives: ");
System.out.println(numFives);
System.out.print("numOnes: ");
System.out.println(numOnes);
}
}

Answers

Answer 1

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);

   }

}

Compute ChangeA Cashier Distributes Change Using The Maximum Number Of Five Dollar Bills, Followed By

Related Questions

various gabs in the digital divide​

Answers

Answer:

factors such as low literacy and income level Geographical restriction lack of motivation motivation of the technology lack of motivation to use technology and digital illiteracy and contribute to the digital device

Write a Python program stored in a file q1.py to play Rock-Paper-Scissors. In this game, two players count aloud to three, swinging their hand in a fist each time. When both players say three, the players throw one of three gestures: Rock beats scissors Scissors beats paper Paper beats rock Your task is to have a user play Rock-Paper-Scissors against a computer opponent that randomly picks a throw. You will ask the user how many points are required to win the game. The Rock-Paper-Scissors game is composed of rounds, where the winner of a round scores a single point. The user and computer play the game until the desired number of points to win the game is reached. Note: Within a round, if there is a tie (i.e., the user picks the same throw as the computer), prompt the user to throw again and generate a new throw for the computer. The computer and user continue throwing until there is a winner for the round.

Answers

Answer:

The program is as follows:

import random

print("Rock\nPaper\nScissors")

points = int(input("Points to win the game: "))

player_point = 0; computer_point = 0

while player_point != points and computer_point != points:

   computer = random.choice(['Rock', 'Paper', 'Scissors'])

   player = input('Choose: ')

   if player == computer:

       print('A tie - Both players chose '+player)

   elif (player.lower() == "Rock".lower() and computer.lower() == "Scissors".lower()) or (player.lower() == "Paper".lower() and computer.lower() == "Rock".lower()) or (player == "Scissors" and computer.lower() == "Paper".lower()):

       print('Player won! '+player +' beats '+computer)

       player_point+=1

   else:

       print('Computer won! '+computer+' beats '+player)

       computer_point+=1

print("Player:",player_point)

print("Computer:",computer_point)

Explanation:

This imports the random module

import random

This prints the three possible selections

print("Rock\nPaper\nScissors")

This gets input for the number of points to win

points = int(input("Points to win the game: "))

This initializes the player and the computer point to 0

player_point = 0; computer_point = 0

The following loop is repeated until the player or the computer gets to the winning point

while player_point != points and computer_point != points:

The computer makes selection

   computer = random.choice(['Rock', 'Paper', 'Scissors'])

The player enters his selection

   player = input('Choose: ')

If both selections are the same, then there is a tie

   if player == computer:

       print('A tie - Both players chose '+player)

If otherwise, further comparison is made

   elif (player.lower() == "Rock".lower() and computer.lower() == "Scissors".lower()) or (player.lower() == "Paper".lower() and computer.lower() == "Rock".lower()) or (player == "Scissors" and computer.lower() == "Paper".lower()):

If the player wins, then the player's point is incremented by 1

       print('Player won! '+player +' beats '+computer)

       player_point+=1

If the computer wins, then the computer's point is incremented by 1

   else:

       print('Computer won! '+computer+' beats '+player)

       computer_point+=1

At the end of the game, the player's and the computer's points are printed

print("Player:",player_point)

print("Computer:",computer_point)

convert decimal number into binary numbers (265)10

Answers

Answer:

HELLOOOO

Alr lets start with steps by dividing by 2 again and againn..

265 / 2 = 132 ( rem = 1 )

132 / 2 = 66 ( rem = 0 )

66/2 = 33 ( rem = 0 )

33/2 = 16 ( rem = 1 )

16/2 = 8 ( rem = 0 )

8/2 = 4 ( rem = 0 )

4/2 = 2 ( rem = 0 )

2/2 = 1 ( rem = 0 )

1/2 = 0 ( rem = 1 )

now write all the remainders from bottom to up

100001001

is ur ans :)))

A blogger writes that the new "U-Phone" is superior to any other on the market. Before buying the U-Phone based on this review, a savvy consumer should (5 points)

consider if the blogger has been paid by U-Phone
assume the blogger probably knows a lot about U-Phones
examine multiple U-Phone advertisements
speak to a U-Phone representative for an unbiased opinion

Answers

Answer:

Speak to a U-Phone representative.

Explanation:

A representative will tell you the necessary details about the U-phone without any biases whatsoever, as they´re the closest to the company when it comes to detail about their products.

Tu teléfono es muy bueno no sé mucho de que se trata porque no se inglés y el celular está en inglés.

The trackpad/touchpad on my laptop is acting unusual. When I click on something or move to an area, it jumps or moves to another area. What would be a good troubleshooting step to try and resolve this issue?

a. Use a mouse instead

b. Remove all possible contact points, and test again while ensuring only a single contact point

c. Refer caller to user guides

d. increase the brightness of the display

Answers

Answer:

My best answer would be, "b. Remove all possible contact points, and test again while ensuring only a single contact point"

This is because usually when the cursor jumps around without reason, it's caused by the user accidentally hitting the mouse touchpad on his or her laptop while typing. ... Similarly, know that just because you have an external mouse attached to your laptop, the built-in mousepad is not automatically disabled.

Brainliest?

A new PKI is being built at a company, but the network administrator has concerns about spikes of traffic occurring twice a day due to clients checking the status of the certificates. Which of the following should be implemented to reduce the spikes in traffic?
A. CRL
B. OCSP
C. SAN
D. OID

Answers

Answer:

Option A (CRL) is the right answer.

Explanation:

Certificates with respective expiration date canceled mostly by CA generating or providing them, then it would no longer be tolerated, is considered as CRL.CRL verification could be more profitable for a platform that routinely manages several clients, all having pronouncements from a certain CA, because its CRL could be retrieved once per day.

Other given choices are not connected to the given scenario. So Option A is the right one.

Using simplified language and numbers, using large font type with more spacing between questions, and having students record answers directly on their tests are all examples of _____. Group of answer choices universal design analytic scoring cheating deterrents guidelines to assemble tests

Answers

Answer:

universal design

Explanation:

Using simplified language and numbers, using large font type with more spacing between questions, and having students record answers directly on their tests are all examples of universal design.

Universal Design can be regarded as design that allows the a system, set up , program or lab and others to be

accessible by many users, this design allows broad range of abilities, reading levels as well as learning styles and ages and others to have access to particular set up or program.

it gives encouragment to the development of ICTS which can be

usable as well as accessible to the widest range of people.

which computer are used by mobile employees as Meter readers.​

Answers

Explanation:

handheld computers

Some handheld computers have miniature or specialized keyboards. Many handheld computers are industry-specific and serve the needs of mobile employees, such as meter readers and parcel delivery people, whose jobs require them to move from place to place.

Which is the first computer brought in nepal for the census of 2028 B.S​

Answers

Answer:

The first computer brought in Nepal was IBM 1401 which was brought by the Nepal government in lease (1 lakh 25 thousands per month) for the population census of 1972 AD (2028 BS). It took 1 year 7 months and 15 days to complete census of 1crore 12.5 lakhs population.

1. Create a pseudocode program that asks students to enter a word. Call a function to compute the different ways in which the letters that make up the word can be arranged.
2. Convert the pseudocode in question one to JavaScript and test your program.

Answers

Answer:

1)Pseudocode:-

Prompt user to enter string

Pass it to combination function which can calculate the entire combination and can return it in an array

In combination method -

Check if the string is length 2 size ie of 0 or 1 length then return string itself

Else iterate through string user entered

Get the present character within the variable and check if the variable is already used then skip

Create a string from 0 to i the index + (concatenate) i+1 to length and recursive call combination function and pass this string and store end in subpermutation array

For each recursive call push character + sub permutation in total arrangement array.

2)Code -

function combinations(userStr) {

   /* when string length is less than 2 then simply return string */

   if (userStr.length < 2) return userStr;

   /* this array will store number of arrangement that word can be stored */

   var totalArrangements = [];

   /* iterate through string user enter  */

   for (var i = 0; i < userStr.length; i++) {

       /* get the current  character  */

       var character = userStr[i];

       /*check if character is already used than skip  */

       if (userStr.indexOf(character) != i)

           continue;

       /* create a string and concanete it form  0  to i index and i+1 to length of array   */

      var str = userStr.slice(0, i) + userStr.slice(i + 1, userStr.length);

       /* push it to totalArrangments  */

       for (var subPermutation of combinations(str))

           totalArrangements.push(character + subPermutation)

   }

   /* return the total arrangements */

   return totalArrangements;

}

/* ask user to prompt string  */

var userStr = prompt("Enter a string: ");

/* count to count the total number of combinations */

let count = 0;

/* call function the return tolal number of arrangement in array */

totalArrangements = combinations(userStr);

/* print the combination in console  */

for (permutation of totalArrangements) {

   console.log(permutation)

}

/* total combination will be  totalArrangements.length */

count = totalArrangements.length;

/*print it to console  */

console.log("Total combination " + count)

Output:-

explain the elements of structured cabling systems​

Answers

Answer:

From this article, we can know that a structured cabling system consists of six important components. They are horizontal cabling, backbone cabling, work area, telecommunications closet, equipment room and entrance facility.

dismiss information I have here and hope you like it and hope you will get this answer helpful and give me the thankyou reactions

I need it in code please (python)

Answers

python coded) pythooonn

Answer:

def main():

 n = int(input("Enter a number to find its sum! "))

 sum = int((n*(n+1)) / 2)

 print(str(sum))

main()

Explanation:

Here is some code I quickly came up with, you can rehash it for your liking.

I basically took this formula and translated it into python code on line 3. Make sure you use paratheses correctly when translating forumlas or any equation, Order of Operations is everything.

Lmk if this helped!

Write steps to Delete data from ‘Datagridview’

Answers

Explanation:

private void btnDelete_Click(object sender, EventArgs e)

{

if (this.dataGridView1.SelectedRows.Count > 0)

{

dataGridView1.Rows.RemoveAt(this.dataGridView1.SelectedRows[0].Index);

}

}

If you lose yellow from your printer, what would happen to the picture?

Answers

Answer:

The picture would be green.

Need help coding a sql probelm (not that hard im just confused)

Answers

Answer:

random answer

Explanation:

point = selct dnsggg

Write a C program to input a character, then check if the input
character is digit, letter, or other character.

Answers

Answer:

// CPP program to find type of input character

#include <iostream>

using namespace std;

void charCheck(char input_char)

{

// CHECKING FOR ALPHABET

if ((input_char >= 65 && input_char <= 90)

|| (input_char >= 97 && input_char <= 122))

cout << " Alphabet ";

// CHECKING FOR DIGITS

else if (input_char >= 48 && input_char <= 57)

cout << " Digit ";

// OTHERWISE SPECIAL CHARACTER

else

cout << " Special Character ";

}

// Driver Code

int main()

{

char input_char = '$';

charCheck(input_char);

return 0;

}

Explanation:

// CPP program to find type of input character

#include <iostream>

using namespace std;

void charCheck(char input_char)

{

// CHECKING FOR ALPHABET

if ((input_char >= 65 && input_char <= 90)

|| (input_char >= 97 && input_char <= 122))

cout << " Alphabet ";

// CHECKING FOR DIGITS

else if (input_char >= 48 && input_char <= 57)

cout << " Digit ";

// OTHERWISE SPECIAL CHARACTER

else

cout << " Special Character ";

}

// Driver Code

int main()

{

char input_char = '$';

charCheck(input_char);

return 0;

}

Create a parent class called Shape with width and height parameters of type double and a function that returns the area of the shape, which simply returns 0. Then define two subclasses, Rectangle, and Triangle, that override the area function to return the actual area (width*height for Rectangle and 1/2*width*height for Triangle).

The code must be in java

Answers

Answer:

umm im not sure tbh

Explanation:

When rating ads, I should only consider my personal feelings on the ad.

Answers

Answer:

yes when rating ads you should only consider your personal feelings on the ad

When you expect a reader of your message to be uninterested, unwilling, displeased, or hostile, you should Group of answer choices begin with the main idea. put the bad news first. send the message via e-mail, text message, or IM. explain all background information first.

Answers

Answer:

explain all background information first.

Explanation:

Now if you are to deliver a message and you have suspicions that the person who is to read it might be uninterested, unwilling, hostile or displeased, you should put the main idea later in the message. That is, it should come after you have provided details given explanations or evidence.

It is not right to start with bad news. As a matter of fact bad news should not be shared through mails, IM or texts.

10 features of the ribbon in microsoft word​

Answers

Answer:yes

Explanation:

Yup

Which of the following definitions best describes the principle of separation of duties?

Answers

Answer:

A security stance that allows all communications except those prohibited by specific deny exceptions

A plan to restore the mission-critical functions of the organization once they have been interrupted by an adverse event

A security guideline, procedure, or recommendation manua

lAn administrative rule whereby no single individual possesses sufficient rights to perform certain actions

Which of the following will cause you to use more data than usual on your smartphone plan each month?

a. make a large number of outbound calls

b. sending large email files while connected to wifi

c. streaming movies from Netflix while not connected to Wi-Fi

d. make a large number of inbound calls

Answers

Outbound calls. You would most likely make more calls TO people rather than receive.

Write a class of complex numbers consisting of:
-Properties:
• Real part of type double;
• Virtual part of type double.
- Method:
• default constructor, 2-parameter constructor;
• Full setter, getter for each variable;
• the print() function prints SoPhuc as a string in the format a + bi, where a is the real part, b is the imaginary part
-Write main() function:
• Create 2 SoPhuc objects
• Use class methods to enter information for 2 objects
• Use print() method to print information of 2 objects that have been created

Answers

Answer:

hi sorry for not knowing the answer

but please follow have a great day,night, or afternoon

Transitive spread refers to the effect of the original things transmitted to the associate things through the material, energy or information.

a. True
b. False

Answers

A is the correct answer

Write a program using integers user_num and x as input, and output user_num divided by x three times.Ex: If the input is:20002Then the output is:1000 500 250Note: In Python 3, integer division discards fractions. Ex: 6 // 4 is 1 (the 0.5 is discarded).LAB ACTIVITY2.29.1: LAB: Divide by x0 / 10main.pyLoad default template...12''' Type your code here. '''

Answers

Answer:

Following are the code to the given question:

user_num = int(input())#defining a variable user_num that takes input from user-end

x = int(input())#defining a variable x that takes input from user-end

for j in range(3):#defining for loop that divides the value three times

   user_num = user_num // x#dividing the value and store integer part

   print(user_num)#print value

Output:

2000

2

1000

500

250

Explanation:

In the above-given program code two-variable "user_num and x" is declared that inputs the value from the user-end and define a for loop that uses the "j" variable with the range method.

In the loop, it divides the "user_num" value with the "x" value and holds the integer part in the "user_num" variable, and prints its value.  

Write a program that uses the function strcmp() to compare two strings input by the user. The program should state whether the first string is less than, equal to, or greater than the second string7. Write a program that uses the function strcmp() to compare two strings input by the user. The program should state whether the first string is less than, equal to, or greater than the second string

Answers

user_str1 = str ( input ("Please enter a phrase: "))

user_str2 = str ( input("Please enter a second phrase: "))

def strcmp (word):

user_in1 = int (len(user_str1))

user_in2 = int (len(user_str2))

if user_in1 > user_in2:

return "Your first phrase is longer"

elif user_in1 < user_in2:

return "Your second phrase is longer"

else:

return "Your phrases are of equal length"

discribe two ways you can zoom in and out from an image

Answers

How to zoom in: u get any two of ur fingers and instead of going inward like ur tryna pop a zit, you go out

How to zoom out: pretend like ur popping pimples on ur phone/device screen

what is computer? write about computer.​

Answers

Answer:

Is an electronic device used for storing and processing data.

let's have a class named Distance having two private data members such as feet(integer), inches(float), one input function to input values to the data members, one Display function to show the distance. The distance 5 feet and 6.4 inches should be displayed as 5’- 6.4”. Then add the two objects of Distance class and then display the result (the + operator should be overloaded). You should also take care of inches if it's more than 12 then the inches should be decremented by 12 and feet to be incremented by 1.

Answers

Answer:

Humildade

Ser justo (Fair Play)

Vencer independente

A desktop computer is a type of mobile device.

a. true
b. false

Answers

Answer:B.false
Answer B

A desktop computer is a type of mobile device: B. False.

What is a desktop computer?

A desktop computer simply refers to an electronic device that is designed and developed to receive data in its raw form as an input and processes these data into an output that's usable by an end user.

Generally, desktop computers are fitted with a power supply unit (PSU) and designed to be used with an external display screen (monitor) unlike mobile device.

In conclusion, a desktop computer is not a type of mobile device.

Learn more about desktop computer here: brainly.com/question/959479

#SPJ9

Other Questions
List all the elements of the following set. Use set notation and the listing method to describe the set. The set of all counting numbers less than or equal to 2. Express the set using set notation and the listing method. (Use a comma to separate answers as needed. Use ascending order.) Use the given information to answer the questions and interpret key features. Use any method of graphing or solving. Round to one decimal place, if necessary. The trajectory of a golf ball in a chip from the rough has a parabolic pattern. The height, in feet, of the ball is given by the equation h(x) -.25x^2 + 3.42, where x is the number of feet away from the golf club (along the ground) the ball is. The ball starts ____ feet above the ground.The ball reaches a maximum height of _____ feet at a horizontal distance of ____ feet away from the golf club 19 it was hit with The ball returns to the ground at about ____ feet away. Iceberg lettuce is grown and shipped to stores for about 40 cents a head, and consumers purchase it for about 92 cents a head. Find the percent increase. Any help here is much appreciated! A(n) _____ typically hires the staff of an employer and writes paychecks, pays taxes, prepares and implements HR policies, keeps all the required HR records for the employer, and bears legal liability for a fee. 2. Below what depth would a submarine have to submerge so that it would not be swayed by surface waves with a wavelength of 24 meters? Question 5(Multiple Choice Worth 4 points)(01.01 MC) Which of the following statements is true?a. Elizabeth Zinser became the first deaf president at Gallaudet University.b. William Stokoe led the charge against signing in schools.c. Abraham Lincoln authorized the first college in the world for the deaf.d. Alexander Graham Bell invented the first cochlear implant. What is the product of 2x(5+3)-4^2 A fight happened between two people in your school, narrate what happened to your teacher PLEASE HELP !!!!! Which type of conic section is described by the following equation?(y - 3)2/4^2- (x+2)^2/6^2=1A. CircleB. Parabola that opens upC. Parabola that opens downU OD. Hyperbola opening left and rightE. EllipseE Hyperbola opening up and dow A man borrows $800 for 2 years at a simple interest rate of 20%. What is the total amount that must be repaid Find three consecutive odd integers whose sum is -213. THE HUNCH BACK OF NOTRE DAME *Sounds/Music *Gestures/Movements* Costume/Makeup/Accessories *Props *Performance Offering direct online sales to consumers while also promoting wholesale and retail sales can result in Multiple select question. cannibalization of retailers' sales. a net loss of sales due to disgruntled dealers. a signal of the company's strong commitment to retailers. channel conflict. 7. Explain the difference between an ionic compound and a molecule, on an atomiclevel (that is, describe what is happening with the atoms that makes these compoundsdifferent) what is the length of segment QV ?, NO LINKS. Simplify by expressing fractional exponents instead of radicals. ou are bringing together faculty from different behavioral disciplines to author a new textbook in organizational behavior. Represented are professors from psychology, sociology, social psychology, anthropology, political science, and industrial engineering. You should expect that the faculty member from ________ will probably contribute information about large-scale group behavior. psychology social psychology anthropology industrial engineering sociology You should avoid all of the following topics except. . . Topics that are controversial. Topics on a single source. Topics that are trivial. Topics that are contemporary. Suppose X has a normal distribution with mean 10.0 and standard deviation 5.0 what is the P(2.0