answer.
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
Anarel [89]
2 years ago
8

Give a recursive (or non-recursive) algorithm to compute the product of two positive integers, m and n, using only addition and

subtraction ?
Computers and Technology
1 answer:
LiRa [457]2 years ago
6 0

Answer:

Multiply(m,n)

1. Initialize product=0.

2. for i=1 to n

3.      product = product +m.

4. Output product.

Explanation:

Here we take the variable "product" to store the result m×n. And in this algorithm we find m×n by adding m, n times.

You might be interested in
A third-grade teacher at Potter Elementary School wants a program that allows a student to enter the amount of money a customer
mina [271]

Answer: IDK

Explanation: ummm I have no idea wut ur asking meh

6 0
1 year ago
Which one of the following is a correct declaration for a method named passAList that has as arguments an array list myList of s
alekssr [168]

Answer:

"public static void passAList(ArrayList<Integer> myList, int[] intArr)", is the correct answer for the above question.

Explanation:

Missing information :

  • The option is missing but the question states "choose from the following". The correct defining syntax is defined above.

Detailed Explantion :

  • The above question asked about syntax which takes the value of list and array as an argument.
  • It is already defined in the above syntax.
  • And the value is passed by the user at the time of function call.
  • The array list is defined by the help of the ArrayList class and the array is defined by the help of the "[]" symbol.

3 0
2 years ago
With Voice over Internet Protocol (VoIP), _____. a. voicemails cannot be received on the computer b. call quality is significant
Pachacha [2.7K]

Answer:

c. Users can have calls forwarded from anywhere in the world

Explanation:

As all you need is the internet, there would be no need to try to sort out roaming as you would on a regular phone line

4 0
1 year ago
Replace the underlines with the words in parentheses that follow: the ____ solves the ____ of a ____ by expressing an ____ in a
adell [148]

The programmer solves the problems of a user by expressing an algorithm in a programming language to make a program that can run on a computer.

5 0
2 years ago
During which stage does the central processing unit analyze the instruction and encode it in the form of a number, and then gene
guapka [62]

Answer:

<em>a. fetch</em>

Explanation:

<em>The device collects a program command from its memory during the run cycle of the fetch. </em>

It then defines and performs the activities needed for that command.  The CPU continuously repeats the cycle of fetching, decoding, and executing a command while  the computer is switched on.

4 0
2 years ago
Other questions:
  • A slide contains three text boxes and three images that correspond to the text boxes. Which option can you use to display a text
    5·2 answers
  • Two technicians are discussing lung protection in the shop. Technician A says that respiratory-protection devices can prevent yo
    5·2 answers
  • _____ is the process of adjusting colors in an image.
    13·2 answers
  • Write a program that allows you to create a file of customers for a company. The first part of the program should create an empt
    12·1 answer
  • Use the image below to answer this question.
    14·1 answer
  • Samuel received an email that looked like it came from his bank. The email told him to click a link that opened an official look
    7·1 answer
  • Using Amdahl’s Law, calculate the speedup gain of an application that has a 60 percent parallel component for (a) two processing
    11·1 answer
  • 7.8.1: Function pass by reference: Transforming coordinates. Define a function CoordTransform() that transforms the function's f
    6·1 answer
  • Write a SELECT statement that selects all of the columns for the catalog view that returns information about foreign keys. How m
    6·1 answer
  • Suggest how the following requirements might be rewritten in a quantitative way. You may use any metrics you like to express the
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!