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
azamat
3 years ago
10

Define the function add_mn that takes two integers m, n as arguments and returns m + 10 * n. For instance, add_mn 3 5 = 3 + 10*5

= 53. You are, however, not allowed to use addition and multiplication directly: instead, you must write a recursive solution that calls add10!
Mathematics
1 answer:
jok3333 [9.3K]3 years ago
8 0

Answer:

// C++ Program to arithmetic operationf on 2 Numbers using Recursion

// Comments are used for explanatory purpose

#include <bits/stdc++.h>

using namespace std;

// add10 recursive function to perform arithmetic operations

int add10(int m, int n)

{

return (m + product(n, 10)); //Result of m + n * 10

return 0;

}

// Main Methods Starts here

int main()

{

int m, n; // 2 Variables m and n declared as integer

cin>>m; // accept input for m

cin>>n; // accept input for n

cout << "Result : "<<add10(m,n); // Print results which is calculated by m + 10 * n

return 0;

}

You might be interested in
A line that crosses parallel lines to create pairs of congruent and supplementary angles
jenyasd209 [6]

Answer:

A traversal

Step-by-step explanation:

7 0
3 years ago
0.611111111. .. repeating equals<br> Q. 12/19<br> b. 11/18<br> c. 13/20<br> d. 10/17
-Dominant- [34]

Answer:

B. 11/18

Step-by-step explanation:

Solve using algebra.

x = 0.611111...

10x = 6.111111...

10x - x = 6.111111.. - 0.61111111..

9x = 5.5

x = 5.5/9

x = 11/18

7 0
3 years ago
Dogs are inbred for such desirable characteristics as blue eye color, but an unfortunate by-product of such inbreeding can be th
sesenic [268]

Answer:

The probability that the dogs are blue eyed and deaf is 13.02%.

Step-by-step explanation:

We are given the following information in the question:

P(Blue eyes) = 31%

P(Deaf) = 38%

P(Deaf | Blue eyes) = 42%

Formula for conditional probability:

P( A|B) = \displaystyle\frac{P(A \cap B)}{P(B)}

Now, let A be the event where the dog is deaf and B be the the event where dog is blue eyed.

P( \text{ Deaf}|\text{Blue eyes}) = \displaystyle\frac{P( \text{Deaf} \cap \text{Blue eyes})}{P(\text{Blue eyes})}\\\\0.42 = \displaystyle\frac{P( \text{Deaf} \cap \text{Blue eyes})}{0.31}\\\\P( \text{Deaf} \cap \text{Blue eyes}) = 0.42\times 0.31 = 0.1302 = 13.02\%

Hence, the probability that the dogs are blue eyed and deaf is 13.02%.

6 0
3 years ago
charlie charted the rainfall in abilene over a one year period. what is the difference between the median and the mode of the da
sveticcg [70]
3.14•8=B because it is the median
7 0
4 years ago
Which of the following functions is graphed below?
kompoz [17]

Answer:

A

Step-by-step explanation:

vertex is (-3,-4)

so inside the absolute value bars need to be postive 3 and the four has to be -4.

6 0
3 years ago
Other questions:
  • Sally consumed 2.5 gallons of water in one day. How many milliliters are equal to 2.5 gallons, if 1 liter = 1,000 milliliters an
    13·2 answers
  • Charmaine made traditional pizzas for her classmates. She recorded whether the students wanted garlic on their pizza. Which desc
    7·1 answer
  • A number is K units to the left of 0 on the number line. Describe the location of it's opposites
    10·1 answer
  • Can someone please help me solve 8(x-5)=8x+40 ASAP, thank you! &lt;3
    6·1 answer
  • I will give you a Brainly crown if it is right. Will you help me
    5·2 answers
  • 1. If y + 1/y = 2 cos teta find y​
    6·2 answers
  • Given: x + 2y = -6.<br><br><br><br> Solve for y.
    7·2 answers
  • What Is 9 5/7 - 3 6/7 equals too? ANSWER FAST!!!!!!!
    9·1 answer
  • Evaluate 5(x + 2) - 12 + 3 for x = 1<br> answers:<br> 26<br> 1<br> 0<br> 11
    10·1 answer
  • Identify the domain of the function shown in the graph.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!