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
jonny [76]
3 years ago
6

Write a pseudocode algorithm that prompts the user to enter a three-digit number and outputs the hundreds, tens and units.

Computers and Technology
1 answer:
chubhunter [2.5K]3 years ago
5 0

Answer:

INPUT "Enter three-digit number" as number

IF number length equals 3 AND is integer:

  hundreds = integer of number / 100

  tens = inter of (remainder of (number / 100) / 10)

  units = remainder of number / 10

  PRINT hundreds + " hundreds"

  PRINT tens + " tens"

  PRINT units + " units"

ELSE:

  PRINT "You need to input a three-digit integer"

Explanation:

integer of division is usually obtained by casting to integer with int() (or // in python)

remainder of is usually obtained by using the modulo operator (%)

So, if you know how many number do you expect, you starting diving by 1xx with the same number of digits and go down by always using "remainder" of the last result and integer division of the same amount of digits, until you get to units, that you only use the remainder.

You might be interested in
Intro to Computers quiz answers me need for test please help me hurry
RSB [31]

Answer:

Ethernet connection

Explanation:

4 0
3 years ago
What is a tag in an HTML document?
Rashid [163]
Code that specifies how the web page should be formatted
8 0
3 years ago
In addition to using the icons to adjust page margins, a user can also use _____.
Elenna [48]

The shift button, space,or the tab.

4 0
3 years ago
Read 2 more answers
What are concepts and accrual​
Darya [45]

Answer:

umm oh nvrm i forgot

Explanation:

4 0
3 years ago
Read 2 more answers
What are the benefits of open source software? Risks?
andrezito [222]

Answer:

more security

fewer bugs and faster fixes

no upgrade pushes

low coast

excellent support

as far as the risk part of it. I think that would be

the risk of license restriction, infringement.

5 0
3 years ago
Other questions:
  • When might it be necessary or advisable to write a shell script instead of a shell function? give as many reasons as you can thi
    15·1 answer
  • Can embedded computers automate security so you can lock and unlock doors remotely
    15·1 answer
  • The acronym ________ is used by programmers to refer to the fact that computers cannot tell difference between good and bad data
    8·2 answers
  • Bonnie gets very nervous before taking tests. What can she do to help her anxiety while she takes her tests?
    15·2 answers
  • Which access database object is best to use for the basis of a report when specific criteria must be applied to the report?
    12·2 answers
  • You have an interface on a router with the IP address of 192.168.192.10 /29. What is the broadcast address the hosts will use on
    15·1 answer
  • Click this link to view O*NET's Skills section for Biomedical Engineers. Note that common skills are listed toward the top and l
    8·2 answers
  • ________ is a human-computer interaction method whereby inputs to and outputs from a computer-based application are in a convent
    8·1 answer
  • Tax preparation software can help prepare and file your taxes by _________.
    7·1 answer
  • Using an open connection to a small company's network, an attacker submitted arbitrary queries on port 389 to the domain control
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!