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]
4 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]4 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
What is the bandwidth for asymmetric digital subscriber line<br> (ADSL)?
igomit [66]
ADSL is asymmetric, meaning the upstream and downstream transmission rates are not equal. Over regular copper phone lines, ADSL can achieve upstream speeds of up to 1.5 Mbps and downstream speeds of up to 9 Mbps. Hope you have a great day
3 0
3 years ago
Read 2 more answers
Justify the statement "The same job title can have different job roles and different qualification criteria in different organiz
Colt1911 [192]

Answer:

anng elsi

Explanation:

3 0
3 years ago
___ data is ____data; non-numeric data; observations are organized into categories without any recognition of order.
Virty [35]

Nominal data is qualitative data; non-numeric data; observations are organized into categories without any recognition of order.

<h3>What is qualitative data?</h3>

Qualitative data is information that cannot be counted, measured or easily expressed using numbers.

It is collected from text, audio and images and shared through data visualization tools, such as word clouds, concept maps, graph databases, timelines and infographics.

Qualitative data is the descriptive and conceptual findings collected through questionnaires, interviews, or observation.

Analyzing qualitative data allows us to explore ideas and further explain quantitative results.

For example, it could be notes taken during a focus group on the quality of the food at Cafe Mac, or responses from an open-ended questionnaire.

To learn more about qualitative data, refer

brainly.com/question/3151198

https://brainly.ph/question/5565846

#SPJ4

5 0
2 years ago
When code is compiled it
lesantik [10]

Answer:

A compiler takes the program code (source code) and converts the source code to a machine language module (called an object file). Another specialized program, called a linker, combines this object file with other previously compiled object files (in particular run-time modules) to create an executable file. In short, it's A or D.

5 0
3 years ago
Read 2 more answers
PLEASE HELP!! In Tynker does anyone know how to do the physics cannon assignment?
madam [21]

Answer: really u want help with a game

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • What is the definition of online communication
    15·1 answer
  • Which function will add a grade to a student's list of grades in Python? add() append() print() sort()
    5·2 answers
  • How does a project manager evaluate the scope of a project?
    14·2 answers
  • ______ is data that is entered into a computer. ______ is the result produced by a computer.
    6·1 answer
  • Explain how software is distinct from hardware.
    8·2 answers
  • Your long and short term goals (career or job etc)? ANSWER FAST!!!
    6·1 answer
  • Anna wants to keep information secure from offenders. Which software should she install on her computer to ensure Internet safet
    13·1 answer
  • Now you are ready to implement a spell checker by using or quadratic. Given a document, your program should output all of the co
    15·1 answer
  • In the scenario below, decide whether you should upgrade the computer or replace it. You’ve been working on your existing laptop
    12·1 answer
  • If you are inviting more than one person to a meeting, you can use a(n) _____ to separate the email addresses.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!