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
ollegr [7]
3 years ago
9

The following program segment is designed to compute the product of two nonnegative integers X and Y by accumulating the sum of

X copies of Y; that is, 3 times 4 is computed by accumulating the sum of three 4s.
Is the program segment correct? Explain your answer.

Product ←0;

Count ←0;

repeat (Product ←Product + Y,

Count ←Count + 1)

until (Count = X)
Computers and Technology
1 answer:
mote1985 [20]3 years ago
5 0

The program is correct: at the beginning, product = 0. Then, we start summing Y to that variable, and we sum Y exactly X times, because with each iteration we increase Count by 1, and check if Count=X so that we can exit the loop.

You might be interested in
You are driving in the right lane of a municipal road the road has three lanes in your direction ahead of you in the lane to you
Mrrafil [7]
Pull Over. Do NOT Try to push the brake or try swerving with the steering wheel. Slowly pull to the side
7 0
3 years ago
Read 2 more answers
Difference between multi-national and global company​
trapecia [35]

A multinational corporation, or MNC, is a company which produces goods and services and has offices in several other countries while a global corporation or company is a company which also has trade relations with several other countries. ... MNCs have official headquarters while global companies do not.

5 0
2 years ago
Read 2 more answers
Discuss the benefits of a system safety effort other than improved safety
klio [65]

Answer: Safety effort of system is defines as the measures that are taken to provide and maintain the protection of the system.There are several methods ,tool and efforts made for the system security .Benefits of the system security are as follows:-

  • Takes control over the hazardous situation and maintain the security
  • System security will also increase the development of the system easily.
  • Approach towards the analyzing of the system function
  • Data, information and functions are safe from being detected in unauthorized way.
  • Functions and implementation is made easy without the fear of getting attacked or hacked.

8 0
3 years ago
Each cable type can transport data at a particular speed only so far before its signals begin to weaken past the point that a re
Nataliya [291]

Answer:

attenuation

Explanation:

Based on the information provided within the question it can be said that the phenomenon that is being described in this scenario is known as attenuation. In the context of physics, this refers to the gradual loss of intensity of something when traveling through a medium. Which in this case would be the data signals travelling through the cables.

7 0
3 years ago
________ is the process of inspecting data that has been input to a program to make sure it is valid before using it in a comput
Mumz [18]

Answer:

Hence, <u>Input Validation</u> is the process of inspecting data that has been input to a program to make sure it is valid before using it in a computation.

Explanation:

The input should be validated before further processing to avoid problems in execution of program afterwards.

The process of input validation is defined to make sure that the input is valid.

Hence, <u>Input Validation</u> is the process of inspecting data that has been input to a program to make sure it is valid before using it in a computation ..

3 0
3 years ago
Other questions:
  • Businesses sometimes achieve uninterruptible service by using a technology known as ____ to keep a mirror copy of all their data
    11·1 answer
  • Which type of address defines a single network interface in a computer or other device?
    7·1 answer
  • To see a custom, object-specific action on the palette of the page layout editor: A. Click Layout Properties on the page layout
    11·1 answer
  • All of the following are aspects of the search process except?
    6·2 answers
  • Which of the following is false about ERP II systems? Question 18 options: 1) They utilize the Web. 2) They include human resour
    9·1 answer
  • I NEED HELP ASAP!
    6·2 answers
  • Write a Java program that creates a two-dimensional array of type integer of size x by y (x and y must be entered by the user).
    7·1 answer
  • Write a Python program that inputs an integer between 0 and 1000 and adds all the digits in the integer. For example, if integer
    6·1 answer
  • Python code 100 Random Numbers (twice)
    9·1 answer
  • PLEASE HELP ME!!!
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!