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
1÷13×2+181÷29383÷2×2=​
elena55 [62]
0.16000617835

You do 1/13 first then multiple by 2, save that answer we use it later, then you do 181/29383 get that answer and divide that answer by 2 and then multiply by 2 and now you take the very first answer we got with the 1/13 * 2 and you add that to the answer you got from 181/29383 divided by 2 multiplied by 2 and that’s how I got my answer.
5 0
3 years ago
Read 2 more answers
What is the following sum?<br>(please show how you worked it out)
AleksAgata [21]

Answer:

4\sqrt[3]{2}x(\sqrt[3]{y}+3xy\sqrt[3]{y} )

Step-by-step explanation:

Let's start by breaking down each of the radicals:

\sqrt[3]{16x^3y}

Since we're dealing with a cube root, we'd like to pull as many perfect cubes out of the terms inside the radical as we can. We already have one obvious cube in the form of x^3, and we can break 16 into the product 8 · 2. Since 8 is a cube root -- 2³, to be specific, we can reduce it down as we simplify the expression. Here our our steps then:

\sqrt[3]{16x^3y}\\=\sqrt[3]{2\cdot8\cdot x^3\cdot y}\\=\sqrt[3]{2} \sqrt[3]{8} \sqrt[3]{x^3} \sqrt[3]{y} \\=\sqrt[3]{2} \cdot2x\cdot \sqrt[3]{y} \\=2x\sqrt[3]{2}\sqrt[3]{y}

We can apply this same technique of "extracting cubes" to the second term:

\sqrt[3]{54x^6y^5} \\=\sqrt[3]{2\cdot27\cdot (x^2)^3\cdot y^3\cdot y^2} \\=\sqrt[3]{2}\sqrt[3]{27} \sqrt[3]{(x^2)^3} \sqrt[3]{y^3} \sqrt[3]{y^2}\\=\sqrt[3]{2}\cdot 3\cdot x^2\cdot y \cdot \sqrt[3]{y^2} \\=3x^2y\sqrt[3]{2} \sqrt[3]{y}

Replacing those two expressions in the parentheses leaves us with this monster:

2(2x\sqrt[3]{2}\sqrt[3]{y})+4(3x^2y\sqrt[3]{2} \sqrt[3]{y})

What can we do with this? It seems the only sensible thing is to look for terms to factor out, so let's do that. Both terms have the following factors in common:

4, \sqrt[3]{2} , x

We can factor those out to give us a final, simplified expression:

4\sqrt[3]{2}x(\sqrt[3]{y}+3xy\sqrt[3]{y} )

Not that this is the same sum as we had at the beginning; we've just extracted all of the cube roots that we could in order to rewrite it in a slightly cleaner form.

6 0
3 years ago
I NEED HELP PLZ!!!!!! 20 POINTS
Amanda [17]

Answer:

1 is c

2 is d

3 is a

Step-by-step explanation:

Sorry it took a bit not pretty good at these but i used an app called desmos and it basically gives the answer

5 0
3 years ago
PLEASE HELP THIS IS DUE IN 5 MINS
Anastaziya [24]

Answer:

Answer is B the 2nd one hope it’s right i think i did this

Step-by-step explanation:

4 0
3 years ago
Need step by step explanation for this,<br> Thanks
Viktor [21]

Answer:

d = 19/5 or, 4.75 in decimal form

Step-by-step explanation:

4 0
3 years ago
Other questions:
  • Select the correct answer.
    14·1 answer
  • Mark owes his sister $15. He earned $20. He gave 1/5 of his earnings to a local charity and then he paid his sister. Does Mark h
    12·2 answers
  • Write an exponential function in the form
    6·1 answer
  • The measurement of a den are shown in the diagram. Find the area of the den in square feet by multiplying the length by the widt
    13·2 answers
  • Is this correct??????????
    8·1 answer
  • Sarah paid $1,932 in tax on her new car
    12·1 answer
  • The function f is given by the table of values as shown below.
    10·2 answers
  • Onny wants to buy a guitar that costs $600. He makes $2 per day. How many days will it take Onny to save enough money to buy the
    15·1 answer
  • Need the answer !!! pls
    6·2 answers
  • Whats the value of x.150 = 8x + 6y
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!