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
How much money will you have in 3 years if you invest $1000 at 3% compounded monthly?
Marta_Voda [28]
A=p(1+i/m)^mn
A=1,000×(1+0.03÷12)^(12×3)
A=1,094.05
5 0
3 years ago
Helllllllp <br> Simplify the expression 43 + 2(3 − 2).<br><br> 14<br> 16<br> 66<br> 68
lora16 [44]

Answer:

68

Step-by-step explanation:

4 0
3 years ago
Read 2 more answers
The table shows values for functions f(x) and g(x) .
Ad libitum [116K]

Answer:

  1, 9

Step-by-step explanation:

You're looking for the values of x where f(x) = g(x). Find the matching f(x) and g(x) values in the table. The value of x on that line is one of the solutions.

4 0
3 years ago
Help please this is due at 12 !!!
Blababa [14]

Answer:

Angle BC, because 70+20 = 90

Step-by-step explanation:

8 0
2 years ago
Determine which lines are parallel if _1 = 22.
Anton [14]

Answer:

c || d

Hope this helps!:)

7 0
3 years ago
Other questions:
  • In a store.60 cans of soup are arranged to be displayed in 10 rows. Why does the fraction 10/60 not represent this situation? ex
    9·1 answer
  • The doctor sees 126 patients in 3 days. How many patients could he see in 9 days?
    14·2 answers
  • Use graph paper and a straightedge to draw the figure. the set of points (4,3), (7,3), (4,0), and (7,0) identifies the vertices
    11·2 answers
  • Problem 5 <br><br><br> Please help
    14·1 answer
  • Plz help me I don’t know this stuff
    8·2 answers
  • What is the range of this function?​
    7·1 answer
  • The height of a ball thrown into the air after t seconds have elapsed is h = −16t2 + 40t + 6 feet. What is the first time, t, wh
    13·1 answer
  • Bernadette works at a Car Lot in Buffalo selling used cars. Each month Bernadette receives $2000 plus she receives a 5% commissi
    8·2 answers
  • Explain why all squares must be rectangles but not all rectangles are squares
    12·1 answer
  • A group of 5 people decide they will equally share of a pizza. How big will each slice be? 4​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!