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
Solve each equation. Round your answers to the nearest ten-thousandth. Please show work. Part 3A​
Butoxors [25]

Answer:

19.

      log9(5x^2 + 10) - log9(10) = 1

<=> log9((5x^2 + 10)/10) = log9(9)

<=> (5x^2 + 10)/10 = 9

<=> 5x^2 + 10 = 90

<=> 5x^2 = 80

<=> x^2 = 16

<=> x = +/- (4)

20.

      log5(2x^2 + 4) + log5(3) = 2

<=> log5((2x^2 + 4) x 3) = log3(9)

<=> 6x^2 + 12 = 9

<=> 6x^2 = -3

 => No real x satisfies.  ( x^2 always larger or equal to 0)

21.

      log6(8) + log6(7 - 2x^2) = 2

<=> log6(8 x (7 - 2x^2)) = log6(36)

<=> 56 - 16x^2 = 36

<=> 16x^2 = 20

<=> x^2 = 5/4

<=> x = +/- sqrt(5/4)

Hope this helps!

:)

5 0
4 years ago
What is 3 ln 3 - ln 9 expressed as a single natural logarithm? ln 3 ln 6 ln 18 ln 27
mariarad [96]

Answer:

\ln(3)

Step-by-step explanation:

The given expresion is

3 \ln(3)  -   \ln(9)

Recall that:

n \ln(a)  =  \ln( {a}^{n} )

We apply this property to get:

\ln( {3}^{3} )  -   \ln(9)

\ln(27)  -  \ln(9)

We apply the quotient rule to get

\ln( \frac{27}{9} )

=  \ln(3)

The first choice us correct

8 0
3 years ago
Read 2 more answers
A positive angle less than 360 degrees that is coterminal with -5 degrees is
nadya68 [22]

Answer:

\theta = 355

Step-by-step explanation:

Given

Let the angle be \theta

\theta < 360

\theta is co-terminal with -5

Required

Find \theta

Start by dividing 5 by 360 (ignore the negative)

\frac{5}{360} = 0.0138

The nearest integer greater than 0.0138 is 1.

<em>This implies that if you were to draw for this problem, the circle you would draw to show -5 degrees would go around 1 time</em>

So, \theta is calculated as:

\theta = -5 + 1*360

\theta = -5 +360

\theta = 355

7 0
4 years ago
A regular pentagon has an apothem of 7.3 inches and a perimeter of 53 inches. What is the area of the pentagon? Round your answe
zvonat [6]

Answer:

Area pf the regular pentagon is 193inch^{2} to the nearest whole number

Step-by-step explanation:

In this question, we are tasked with calculating the area of a regular pentagon, given the apothem and the perimeter

Mathematically, the area of a regular pentagon given the apothem and the perimeter can be calculated using the formula below;

Area of regular pentagon = 1/2 × apothem × perimeter

From the question, we can identify that the value of the apothem is 7.3 inches, while the value of the perimeter is 53 inches

We plug these values into the equation above to get;

Area = 1/2 × 7.3× 53 = 386.9/2 = 193.45 which is 193inch^{2} to the nearest whole number

3 0
4 years ago
Read 2 more answers
Kal decides to open a home-based cupcake business. His cost is an initial value of $10 in operating expenses plus $0.25 to make
pshichka [43]

Answer:

4

Step-by-step explanation:

4 0
2 years ago
Other questions:
  • How much would $500 invested at 6% interest compounded monthly be worth after 5 years
    8·1 answer
  • Find the vertical and horizontal asymptote if they exist
    12·1 answer
  • David uses drawing software to rotate the regular hexagon about its center. Through which angle measures can he rotate the hexag
    9·2 answers
  • What is 916,000 in scientific notation?
    11·2 answers
  • Is the table x= 0, 2, 2, 3 y= 1, 1, 3, 1 linear?
    15·1 answer
  • What is a?<br><br> 45 = 4(a + 3) – 3<br><br> A: a = –9<br> B: a = 12<br> C: a = 9<br> D: a = –12
    15·2 answers
  • A. y ≤ -3x + 4<br>B. y ≥ -3x - 4<br>C. y ≥ -3x + 4<br>D. y ≤ -3x - 4 ​
    11·2 answers
  • Alex flips a coin 20 times the coin lands on tails 8 times what is the experimental probability of the coin landing on heads
    14·1 answer
  • I need help fast plz someone help I really need help an thank you
    9·1 answer
  • Help me pleaseeeee!! &lt;3
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!