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
Naya [18.7K]
3 years ago
12

Write a program to input money in cents from user, example 12745 and display the one dollar bills and the cents. Submit source c

ode.
Computers and Technology
1 answer:
ira [324]3 years ago
6 0

import java.util.*;  //This is used to import the Scanner

class Main {

 public static void main(String[] args) {

   System.out.println("Hello world!");

   Scanner ValCents = new Scanner (System.in);

   System.out.println("Enter Number:");

   int user_input = ValCents.nextInt();

   int result = user_input/100;  // This one will solve for the one dollar bills.

   int remain = user_input % 100;  // This one will get the remainder of cents.

   System.out.println(result + " One Dollar Bills");

   System.out.println(remain + " Cents");

 }

}

Remember that you need to get the amount of dollar bills separately from the number of cents. This is because the int variable will always return the whole value of the number. The modulo is used to get the variable of the cents as the whole number is already taken by the "result".

You might be interested in
The n modifier after the tilde forces the index variable to expand only to the ______
KATRIN_1 [288]

Answer: filename and extension.

Explanation:

Suppose we have %~nxa, where we have two modifiers n and x, and a single variable a.

So, the n modifier after the tilde forces the index variable to expand only to the  filename(by the n modifier) and the extension(by the x modifier).

It produces the filename and extension instead of the full path.

5 0
2 years ago
Which of these engine components forms a tight seal between the piston and the cylinder and is necessary for proper engine opera
TEA [102]
<h2>Piston rings help form a tight seal between the piston and cylinder.   Answer is A. Piston ring</h2>
5 0
3 years ago
Read 2 more answers
National ISPs usually offer fewer services and have a smaller technical support staff than regional ISPs.
choli [55]

Answer:

um not sure

Explanation:

5 0
2 years ago
A student is curious about how a Web site appears on his computer screen. On a piece of paper,
nata0808 [166]

A student is curious about how a Web site appears on his computer screen. There is a communication between the client and the server in the Application Layer.

Explanation:

  • When we choose to open a webpage (in any browser) the seventh layer of the OSI model - called Application layer will help to do that.
  • What happens after we write the webpage address in address bar is that the Application layer protocol (also called HTTP) formats and sends the request from the client's browser (Internet Explorer, Mozilla Firefox , Opera, Safari etc.) to the server.
  • It also formats and sends the server's respond back to client's browser. This process happens very fast and all the OSI model layers are processing in it (not only the Application layer).
  • All the layers are working together and each of them is responsible for some particular job, but all together they work as one. The layers communicate with each other and in case of error they will retry and fix the error or if they are unable to do it, the responsible layer will inform the user about the source of the problem.
  • What happens when page is requested and received? If we will remove the graphical and visual image and look at the process that computer does. We will see a set of commands, mathematical algorithms, symbols, letters and not understandable codes and processes.
  • When data is sent from "A" to "B", a transport layer is responsible to send and deliver it correctly and exactly the same, what was requested.
  • If the request, processed by "A" (sender) is too long, the transport layer will divide it in segments (called segmentation process) to understand well and not make a mistake while sending the data to "B" (recipient). After this process data is travelling through the network to the "B" (recipient), if the sent data is segmented or divided, the transport layer is responsible for reassemble it again and "B" (recipient) receives its requested data (It can be web page or other data).
  • If the transport layer will not do the segmentation process, then the next - network layer - will check the data and if the requested message is too long it will fragment it (called fragmentation process) and will provide the same as transport layer had to do.
  • All the layers processes are connected to each other and work cooperatively.
5 0
3 years ago
A customer would like you to install a high-end video card suitable for gaming. Your installation and configuration SHOULD inclu
Snowcat [4.5K]

Answer: • Ensure that the video card is compatible with the expansion slot

• Install video drivers from CD and then install updated drivers from the internet

• Configure the PC to use the integrated graphics if available and needed

Explanation

Your question isn't complete as you didn't put the options but I got the options online and the correct answers have been provided.

The installation and configuration for the high-end video card suitable for gaming will include:

• Ensure that the video card is compatible with the expansion slot

• Install video drivers from CD and then install updated drivers from the internet

• Configure the PC to use the integrated graphics if available and needed

4 0
2 years ago
Other questions:
  • You've decided to use a subnet mask of 255.255.192.0 with your 172.17.0.0 network to create four separate subnets. The network I
    13·1 answer
  • Referential integrity states that:______.
    15·1 answer
  • When developing e-business systems, an in-house solution usually requires a ____ for a company that must adapt quickly in a dyna
    11·1 answer
  • Which of the following is the best definition of a computer code? a secret language a mathematical language a language that comp
    10·2 answers
  • Who wants brainlyest! NO LINKS how do you message someone on brainly
    10·2 answers
  • What is Error Code: 232011
    11·2 answers
  • Brain for free 12628397
    14·2 answers
  • Indicate if the statement is true or false False 1. A spreadsheet cannot recalculate after you have changed data in your workshe
    15·1 answer
  • 1. Give one reason why data is represented in binary in a computer [1]
    10·1 answer
  • The terminology used to describe a possible path to resolution to a problem from one end to the other is called what?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!