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
Which of the following is a proper use of the application NetStumbler?Which of the following is a proper use of the application
Eddi Din [679]

Answer:

Finding rogue access points within your network

Explanation:

A

5 0
4 years ago
Read 2 more answers
ANSWER ALL QUESTIONS CORRECTLY PLEASE AND YOU WILL GET A BRAINLIEST AND 10+ POINTS!!!! I WOULD REALLY APPRECIATE IT
miskamm [114]

Answer: uhm can u explain what ICT is so i can understand the questions pls when i whould gladly help :)

Explanation:

7 0
3 years ago
ACCOUNTING
ivann1987 [24]

last question is D

Hope this helps

7 0
4 years ago
Read 2 more answers
My mac book airs touch pad stopped working and i can't click. what do i do?
julsineya [31]
Get it in to be fixed
7 0
3 years ago
Read 2 more answers
When a cryptogrpahic system is used to protect data confientiality what takes place?
Alex73 [517]

Answer:

Unauthorized users are prevented from viewing or accessing the resource

5 0
2 years ago
Other questions:
  • You have been tracking your exercise routine, which involves running, lifting weights, yoga, and stretching. You want to see wha
    15·2 answers
  • Poems Roses are red,
    15·1 answer
  • In object-oriented analysis, objects possess characteristics called _____.â
    14·1 answer
  • Yvonne found an article online that relates to her research topic, but the article does not cite the author. What should Yvonne
    8·2 answers
  • What is a Slide Master?
    14·2 answers
  • Why should the ISO be adjusted when taking a picture of a child blowing out candles in a darkened room?
    10·1 answer
  • Are all tps dashboards
    15·1 answer
  • Visual Basics: 1 ) Write an if/else statement that compares the double variable pH with 7.0 and makes the following assignments
    9·1 answer
  • What game is this? help mee?
    8·2 answers
  • When a derived class method has the same name as a base class method, it is often said that the derived class method ________ th
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!