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]
2 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]2 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 the Boolean logical operator for OR in C#?
VashaNatasha [74]
This would be &&

Hope this helped
8 0
2 years ago
Read 2 more answers
Do you really think our life applications and OSs will be open source at the end for everything?
algol [13]

Answer:

 Yes, the given statement is true because the life applications like various networking application and computer and television shows are basically operated and monitored by various OSS  (operational support system).

The open source basically refers to the system which is open for all so that everyone can easily contribute. The operational support system handle all the applications based on our daily life. By proper analyzing the operational system so that it provide efficient output and various resources.

Therefore, various life application and operational system are open source.  

4 0
2 years ago
BRAINLIEST!!! 20 PNTS!!!! HELPP!!!
12345 [234]

Answer:

A) Parentheses

Explanation:

Conditional statements control behavior in JavaScript and determine whether or not pieces of code can run.

There are multiple different types of conditionals in JavaScript including:

If” statements: where if a condition is true it is used to specify execution for a block of code.

“Else” statements: where if the same condition is false it specifies the execution for a block of code.

“Else if” statements: this specifies a new test if the first condition is false.

Now that you have the basic JavaScript conditional statement definitions, let’s show you examples of each.

If Statement Example

As the most common type of conditional, the if statement only runs if the condition enclosed in parentheses () is truthy.

EXAMPLE

if (10 > 5) {

     var outcome = "if block";

}

​outcome;

OUTPUT

"if block"

Here’s what’s happening in the example above:

   The keyword if tells JavaScript to start the conditional statement.

   (10 > 5) is the condition to test, which in this case is true — 10 is greater than 5.

   The part contained inside curly braces {} is the block of code to run.

   Because the condition passes, the variable outcome is assigned the value "if block".

7 0
2 years ago
- Consider the relation R = {A, B, C, D, E, F, G, H, I, J} and the set of functional dependencies F = { {B, C} -> {D}, {B} -&
Olenka [21]

Answer:

The key of R is {A, B}

Explanation:

A key can be seen as a minimal set of attributes whose closure includes all the attributes in R.

Given that the closure of {A, B}, {A, B}+ = R, one key of R is {A, B} But in this case, it is the only key.

In order for us to to normalize R intuitively into 2NF then 3NF, we have to make use of these approaches;

First thing we do is to identify partial dependencies that violate 2NF. These are attributes that are

functionally dependent on either parts of the key, {A} or {B}, alone.

We can calculate

the closures {A}+ and {B}+ to determine partially dependent attributes:

{A}+ = {A, D, E, I, J}. Hence {A} -> {D, E, I, J} ({A} -> {A} is a trivial dependency)

{B}+ = {B, F, G, H}, hence {A} -> {F, G, H} ({B} -> {B} is a trivial dependency)

To normalize into 2NF, we remove the attributes that are functionally dependent on

part of the key (A or B) from R and place them in separate relations R1 and R2,

along with the part of the key they depend on (A or B), which are copied into each of

these relations but also remains in the original relation, which we call R3 below:

R1 = {A, D, E, I, J}, R2 = {B, F, G, H}, R3 = {A, B, C}

The new keys for R1, R2, R3 are underlined. Next, we look for transitive

dependencies in R1, R2, R3. The relation R1 has the transitive dependency {A} ->

{D} -> {I, J}, so we remove the transitively dependent attributes {I, J} from R1 into a

relation R11 and copy the attribute D they are dependent on into R11. The remaining

attributes are kept in a relation R12. Hence, R1 is decomposed into R11 and R12 as

follows: R11 = {D, I, J}, R12 = {A, D, E} The relation R2 is similarly decomposed into R21 and R22 based on the transitive

dependency {B} -> {F} -> {G, H}:

R2 = {F, G, H}, R2 = {B, F}

The final set of relations in 3NF are {R11, R12, R21, R22, R3}

4 0
3 years ago
The file extension of MS-Word document in office 2007 is?(a) .pdf (b) .doc (c) .docx (d) .txt
serious [3.7K]
It is usually .doc but if you use notepad, (the free version of Word) it's .docx
5 0
2 years ago
Read 2 more answers
Other questions:
  • What does the hard disk drive do? It stores all of the information on a computer. It controls a computer’s operating system. It
    12·2 answers
  • Jill is setting up a presentation and wants to use a built-in equation, such as the area of a triangle. To insert this in her pr
    14·2 answers
  • Select the correct answer.
    13·1 answer
  • You designed a program to create a username using the first three letters from the first name and the first four letters of the
    6·1 answer
  • When you open a program, the hard drive
    7·1 answer
  • Which type of document should Omar print?
    5·2 answers
  • A UI text element must be added to ______.an empty background container game objecta prefaba slot game objecta tray objecta canv
    6·1 answer
  • ________________, _______________ and ___________ are what you see when you open Excel
    14·2 answers
  • Does anyone have Rblx? if so write your username
    6·1 answer
  • What are good reasons to do yearly disaster recovery testing? check all that apply
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!