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
What is MARC? Discuss structure of MARC
nordsb [41]
What do you mean? I don't understand.
7 0
3 years ago
When computer network are joined together they form a bigger network called the​
Airida [17]

Answer:

A WAN can be one large network or can consist of two or more lans connected together. The Internet is the world's largest wan.

Explanation:

8 0
3 years ago
The fastest way to get help is to type a word or two in the search box.
Elanso [62]
The fastest way to get help is to type a word or two in the search box. TRUE.
5 0
3 years ago
Who is the best basketball player ever... if you do not say lebron do not comment
Andrews [41]

Kobe was the best basketball player R.I.P

6 0
3 years ago
When I click on someone who asked a question and i want to see there answer it is always blurred and when I asked a question I c
yuradex [85]

Answer:

If your on pc like me use ad blocker I do that but otherwise watch the add press ok after if it dosemt work tell me I’ll try and find you it and for ad blocker you also can have a jailbreak divice and to get and blocker go to chrome extension website search up pop up ad blocker

Explanation:

7 0
3 years ago
Other questions:
  • A species of snake lives in a rainforest. Which would be an adaptation for this
    10·2 answers
  • If you are working in a word-processing program and need to learn more about its features, the best place to get assistance is f
    7·2 answers
  • Write a script which: Uses the input function to get any number and store it in a variable named my_number Create a new variable
    8·1 answer
  • How I can learn writing code?
    12·2 answers
  • How do you validate the type of text that a user enters?
    7·1 answer
  • George is sketching a wireframe representation of the home page of his website. What aspect of the home page would be impossible
    11·1 answer
  • Your personal opinion about what a "successful" console in the future will need to include to sell well. How have the changes in
    12·1 answer
  • Type the numbers 1-50 and then type Computers and Technology twice type it once forward and once backwards.
    5·2 answers
  • Explain Http and Ftp​
    12·1 answer
  • KELLY Connect
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!