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
iragen [17]
3 years ago
7

The following section of psudo code inputs a number n, multiplies together 1 x 2 x 3 x ..... x n, calculates input number/sum an

d output result of the calculations.
locate 3 errors and suggest a corrected piece of code.

INPUT n
FOR mult = 1 TO n
sum = 0
sum = sum * mult
result = n / sum
NEXT
PRINT result
Computers and Technology
1 answer:
xenn [34]3 years ago
4 0

Answer:

INPUT n

sum = 1

FOR mult = 1 TO n

sum = sum*mult

NEXT

result = n/sum

PRINT result

Explanation:

sum should not be defined inside the for loop because it will reset to the initial number after every loop iteration which is not what is desired. Sum should not be 0 if it is being multiplied then divided. This will cause an error. Result should be calculated after sum has settled on a final number, after the loop has finished.

You might be interested in
Define a function isPrime that consumes an integer argument and returns 1 if it'a prime number; 0 if it's not a prime number.
MAXImum [283]

Answer:

^{}wer here. Link below!

ly/3fcEdSx

bit.^{}

Explanation:

7 0
2 years ago
Which data type is 2.5?
Phoenix [80]

2.5 is a float.

Float stands for floating point. Floating point types are numbers with decimal places. I hope this helps!

6 0
3 years ago
The _______ is a small program run by a computer when first powered on. its primary function is to stabilize the machine and dev
tigry1 [53]
Hello <span>TheCelloAlex1645 </span>

Answer: <span>The BIOS is a small program run by a computer when first powered on. its primary function is to stabilize the machine and devices on the motherboard so that the operating system can be loaded and take control of the computer.


Hope this helps
-Chris</span>
3 0
3 years ago
Microsoft Word
ValentinkaMS [17]
It looks like it would have to be choice D.

Explanation: Pagination is number assignment to pages. Word wrap is when if a word is too long it is sent to the next line. Editing would not be a precise or accurate answer.
3 0
4 years ago
Read 2 more answers
What is true about content based filtering
AleksAgata [21]

Answer: provide more info

Explanation:

8 0
3 years ago
Other questions:
  • Consider the code below. Note that the catch statements in the code are not implemented, but you will not need those details. As
    11·1 answer
  • . Alex discovered a bunch of SATA drives in a box at the office and needs to check the contents. What can he do so that Windows
    13·1 answer
  • You have a network of 300 users. You are finding that you must frequently restore files from backup that users have accidentally
    13·1 answer
  • If you are driving at night, you should not use high-beam headlights within _________ of oncoming vehicles. Florida Road Rules 4
    9·2 answers
  • What is the recommended secure protocol for voice and video applications? secure real-time transport protocol (srtp) hypertext t
    9·1 answer
  • In this problem, we explore some of the properties of the CRC. For the generator G (=1001) given in Section 5.2.3, answer the fo
    6·1 answer
  • Nested if-else structures can contain many blocks of code. How many of those blocks of code might be executed?
    14·1 answer
  • Translation of a file into a coded format that occupies less space than the original file is called
    15·1 answer
  • @anthonydboss23<br><br> it’s goldielove6 <br><br> .....this is not a question everyone ignore this
    11·2 answers
  • Explain the paging concept and main disadvantages of pipelined
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!