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
Strike441 [17]
2 years ago
12

You are to write a program that will input a number between 1 and 99. The number will represent the change from a transaction. Y

our program will take the change and output the least amount of coin possible. You can assume that there are 50 cent, 25 cent, 10 cent, 5 cent and 1 cent coins (halves, quarters, dimes, nickels, and pennies).
Computers and Technology
1 answer:
xxMikexx [17]2 years ago
3 0

Answer:

Explanation:

public class Exercise50 {

    public static void main(String args[]) {

 System.out.println("\nDivided by 3: ");  

 for (int i=1; i<100; i++) {

  if (i%3==0)  

  System.out.print(i +", ");    

 }    

   

 System.out.println("\n\nDivided by 5: ");

 for (int i=1; i<100; i++) {

  if (i%5==0) System.out.print(i +", ");    

 }

   

 System.out.println("\n\nDivided by 3 & 5: ");    

 for (int i=1; i<100; i++) {

  if (i%3==0 && i%5==0) System.out.print(i +", ");    

 }

 System.out.println("\n");

You might be interested in
With a(n) ____ you can arrive at a scene, acquire the data you need, and return to the lab as quickly as possible.
valkas [14]

Answer:

Your answer is initial-response field kit

Explanation:

7 0
2 years ago
Assuming a computer has a single processor and a single core with no support for parallel execution, explain why running a multi
IRISSAK [1]

Answer:

Explanation:

Before we go deep into this question lets have some brief knowledge on parallel execution, parallel processing and multi tasking.

Parallel Execution : in this two or more tasks or program can be executed parallel or simultaneously.

For example if there are two processors and four programs to be executed then it executes two at a time.

Multi tasking: in this two or more tasks can be performed simultaneously switching between them without exiting any application.

For example we use notepad, word pad, excel sheet, chrome all at a time switching between each other.

Multi Threading: It is splitting up the program into different threads.If the contents in the program are independent on each other then the program can be split into multi threads and can be processed.

Multi threading in multi core or processing unit : In this threads are executed parallel or simultaneously in different processes.

For example if there are two processors then one multi threaded program can execute two threads in two different processors.

Multi threaded program in single core unit : In this, program is multi threaded where as threads cannot execute parallel or simultaneously. they sholud be executed by the same processor. So they should wait in queue

Ex: consider three tasks of 6 secs each and multi threaded each into three threads of two seconds.

Task1 3secs > task2 3secs > task3 3 secs it repeats until each task is completed

Total time taken is 3+3+3+3+3+3+3+3+3 is 18seconds...

If they are executed one by one without multi threading total execution time has no change..

Where as multi threading program has its advantages if different threads are executed at different place..

If one thread executes at network, another at printer and other processor then these three can execute at same time at different processors. Multi threading has its advantages but in single core systems it doesn't affect the performance.

Inter process communication consists of

Information Sharing, message passing, Modularity.

In shared memory inter process communication processes shares the memory between each other.

In message passing communication process communicates like request and replies for information and resources.

Interlocking is due to error in resource sharing and information sharing. It results in system collapse.

Al these process communication is required if there are two or more.processes but in single core it is not much useful and advisable.

In single core there will be a single processor, processing multi threaded program as it can access all the memory contents there will be no problem of process communication. Where as in multi core systems different processes may compete for same memory or resource.

In single core systems inter process communication makes things complex and these complexity is not much useful in any of the improvement in performance.

4 0
3 years ago
Fordham3 Hardware is known for its consensus buying center culture. Recognizing this corporate culture, someone attempting to se
balandron [24]

Answer: (c) focus exclusively on the head of the buying center.

Explanation:

As Fordham3 Hardware is known for its consensus buying center culture, so someone attempting to sell to Fordham3 should focus exclusively on the head of the buying center.

8 0
3 years ago
Use conversion tool to convert the binary numbers to decimal.
Neko [114]
It’s real my easy you can use a calculator or an online converter. Or division

(111001)₂ = (1 × 2⁵) + (1 × 2⁴) + (1 × 2³) + (0 × 2²) + (0 × 2¹) + (1 × 2⁰) = (57)₁₀

(1100000)₂ = (1 × 2⁶) + (1 × 2⁵) + (0 × 2⁴) + (0 × 2³) + (0 × 2²) + (0 × 2¹) + (0 × 2⁰) = (96)₁₀

(1010101)₂ = (1 × 2⁶) + (0 × 2⁵) + (1 × 2⁴) + (0 × 2³) + (1 × 2²) + (0 × 2¹) + (1 × 2⁰) = (85)₁₀

(1001000)₂ = (1 × 2⁶) + (0 × 2⁵) + (0 × 2⁴) + (1 × 2³) + (0 × 2²) + (0 × 2¹) + (0 × 2⁰) = (72)₁₀
7 0
2 years ago
Read 2 more answers
You are trying to access the Wi-Fi network at a coffee shop. What protocol will this type of wireless networking most likely use
Anna71 [15]

The wireless network is called WAP protocol

8 0
2 years ago
Other questions:
  • The class Date has a single constructor that accepts the integer value: a month- (1 for January through 12 for December), a day
    13·1 answer
  • Write a program that takes as input an arithmetic expression followed by a semicolon ";". The program outputs whether the expres
    11·1 answer
  • By defeaut, Excel cells are top aligned<br><br> a. True<br><br> b. False
    12·1 answer
  • i will be doing an interview to someone so plz comment down below something random and you will automatically enter
    11·1 answer
  • How do graphic designers showcase their work?
    14·2 answers
  • What is the name of the process that weighs the alternatives, gathers all necessary information, and can ultimately lead you to
    9·2 answers
  • A technician has been dispatched to a customer site to diagnose an issue where the computer turns off intermittently. Upon arriv
    11·1 answer
  • Is anyone a robIox moderator?
    13·2 answers
  • We call any device connected to the Internet a(n) ________. Group of answer choices router host IP client
    9·1 answer
  • There are many potential risks associated with the internet. what do we call the distribution and access of illegal copies of di
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!