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
Help me for 3???????
Alika [10]
She could give everyone an attendance sheet to mark down how much time it took them to read each week. i hope this answer has come to you pleasing
6 0
3 years ago
Read 2 more answers
No<br> please no please whyyyyyyy
mestny [16]

Answer:?

Step-by-step explanation:

3 0
3 years ago
Read 2 more answers
The side lengths of a triangle are 5,10, and 13. Is this a right Triangle?
ollegr [7]

No because 5^2 +10^2 is not equavalent to 13^2

by using the pythagoras' theorem

3 0
3 years ago
The number of surface flaws in a plastic roll used for auto interiors follows a Poisson distribution with a mean of 0.05 flaw pe
ElenaW [278]

Answer:

0.6065

Step-by-step explanation:

Probability mass function of probability distribution : P(X=x)=\frac{e^{-\lambda} \times \lambda^x}{x !}

a mean of 0.05 flaw per square foot

Each car contains 10 sq.feet of the plastic roll

Mean = 0.05

Mean = \lambda = 0.05 \times 10=0.5

We are supposed to find What is the probability that there are no flaws in a given car’s interior i.e,P(X=0)

Substitute the value in the formula

P(X=0)=\frac{e^{-0.5} \times (0.5)^0x}{0 !}

P(X=0)=\frac{e^{-0.5} \times (0.5)^0}{1}

P(X=0)=0.6065

Hence the probability that there are no flaws in a given car’s interior is 0.6065

5 0
3 years ago
Tom has twice as many marbles as Luke. Together they have 39 marbles. How
Georgia [21]
x-Luke\ marbles\\\\2x-Tom\ marbles\\\\x+2x=39\\\\3x=39\\\\x=39:3\\\\x=13\\\\2x=2(13)=26\\\\Answer:Tom\ have\ 26\ marbles.
6 0
3 years ago
Read 2 more answers
Other questions:
  • What is the Taylor series for f(x)=sin^2(5x)?. Hint: using the identity sin^2 x = 1/2 (1-cos(2x))
    9·1 answer
  • Grade 8- The Pythagorean Theorem
    13·1 answer
  • Add<br> (5x^4+ 2x^3– 1)+(3x² – 3x + 3)
    13·2 answers
  • The radius of the circle whose equation is (x-3)^2 + (y+1)^2 = 16 is
    13·1 answer
  • State whether either extreme in the data set is an outlier.
    7·1 answer
  • How do you find the answer
    7·1 answer
  • Josie left an $8.00 tip restaurant. How many was her total bill, if the tip was 20% of the total?
    5·1 answer
  • Which of the following slopes of a line passes through points (2, 3) and (4,7) ?
    10·1 answer
  • Boy boy boy boy boy boy boy boy boy
    13·2 answers
  • Find the equation of the line through (-9,6) that is perpendicular to the line through (7,8),
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!