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
I need help for 2,3,4 and 5
hoa [83]

Answer:

2 is 12 3 is 3 faces 4 is 151  that's all   i can tell u at least i helped

Step-by-step explanation:

5 0
3 years ago
3x+4y=12 6x+2y=6 rewrite each equation and soap intercept form
miskamm [114]

  • Move 4y to the front so it should be 4y=12-3x
  • Divide the equation like how I did in the picture above then you should have y=3-3/4x
  • Then you switch it to y=-3/4x+3 and that's your answer.

Now for 6x+2y=6

  • Move 2y to the front so it looks like 2y=6-6x
  • Then you divide the equation by 2 like in the photo above and that should give you y=3-3x
  • Finally you switch the equation to y=-3x+3 because we are using the Slope Intercept Form. (Y=mx+b). That's your answer.

Sorry if my handwriting is bad.

5 0
3 years ago
Gasoline at a particular gas station costs $2.78 per gallon. If Cory buys $18 of gas, how many gallons did he buy?
Anon25 [30]

Answer:

Cory bought 6.474 gallons of gasolline.

Step-by-step explanation:

The total cost of gasoline (C), measured in dollars, is given by the following expression:

C = n\cdot c

Where:

n - Amount of gasoline, measured in gallons.

c - Unit cost, measured in dollars per gallon.

Given that C = \$\,18 and c = \$\,2.78\,\frac{1}{gal}, the amount of gasoline is cleared and calculated:

n = \frac{C}{c}

n = \frac{\$\,18}{\$\,2.78\,\frac{1}{gal} }

n = 6.474\,gal

Cory bought 6.474 gallons of gasolline.

3 0
3 years ago
I WILL GIVE OUT BRAINLIST!!!!!!
Paraphin [41]

Answer:

The rock's height is always increasing from 0 to 3 seconds. (0,3)

Step-by-step explanation:

The graph rises when x = 0 up until it reaches the vertex, aka where x=3 is.

4 0
3 years ago
8 5/6 rounded to the nearest whole number
german

Answer: 9.

Step-by-step explanation:

8 5/6 is a mixed number with a whole number and a fraction. We want to round to the nearest whole number without the fraction.

First, we convert the mixed fraction to an improper fraction or fraction like this:

((8 x 6)+5)/6 = 53/6

Then, we divide the numerator by the denominator from the previous step:

53/6 = 8.83

Now we have one decimal number. Round using the following rules:

If the number to the right of the decimal point is .5 or higher, then add 1 to the left of the decimal point.

If the number to the right of the decimal point is less than .5, then leave the number to the left of the decimal point as is.

.83 is .5 or higher. Thus, we add 1 to the left of the decimal point. 8 5/6 rounded to the nearest whole number is therefore the answer will be 9.

3 0
3 years ago
Read 2 more answers
Other questions:
  • The Frederick country fair costs $15.00 to get in and $2.50 per ride, while the Montgomery County Fair costs $10.00 to get and $
    6·1 answer
  • What is the completed square of x^4 + 7x^2 - 3
    15·1 answer
  • What is the Circumference of a Circle with a radius of 8 m?
    6·1 answer
  • What is -15=11-2t solved
    6·1 answer
  • 4. 4x-(3/5)=(2/5) 5. x-13+4x=22 6. -36=(-6)(2x-14)
    8·1 answer
  • HELP PLEASE Which of the following is a term?<br> A:17y + 11<br> B:6p<br> C:7x ÷ 2<br> D: 1 +1
    13·1 answer
  • Anyone know the right answer?!
    10·1 answer
  • Find the value of x and y.<br> 60°<br> 6
    10·2 answers
  • The first two angles in a triangle are 15 degrees and 20 degrees. What does the third angle have to be?
    15·1 answer
  • a construction worker needs to pour a rectangular slab 23 ft long, 24 ft wide, and 8 in thick. how many cubic yards does the con
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!