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
PLEASE HELP!!!!!!!
MatroZZZ [7]

Answer: 2 pair of leggings is $24 she has $36 so she can buy 1 shirt

3 0
3 years ago
-17x + 2 +3x^2 + 2x^3 divided by x-2
Stells [14]

Answer:

2x^2+7x-3

remainder is -4

Step-by-step explanation:

Check the image

6 0
3 years ago
To sample the average number of pages for the books in the school library, the
sashaice [31]

Answer:

feeefewf

Step-by-step explanation:

fwevf

6 0
2 years ago
Kevin has $24 to buy a gift for his cousin he found a gift for $22 with a 5% sales tax added on will Kevin have enough money to
STatiana [176]

Kevin will have enough. He will need to pay $23.10.

5% of $22 is $1.10.

22+1.10=23.10

23.10 is less than 24

6 0
3 years ago
What is the value of z
never [62]

Answer:

30

Step-by-step explanation:

6 0
2 years ago
Other questions:
  • $5.50 markup 75% what is the selling prize
    13·1 answer
  • A metalworker has a metal alloy that is 20​% copper and another alloy that is 65​% copper. How many kilograms of each alloy shou
    14·1 answer
  • Find the number of 4-digit numbers that contain at least three odd digits.
    8·2 answers
  • What is the equation of the line graphed below?
    6·2 answers
  • Please help me!!!!!!!
    12·1 answer
  • The inverse of G(X) is a function.
    6·2 answers
  • I just need help with answering this question
    6·2 answers
  • Helppppp meeeee!!!!!!!!!!!
    13·1 answer
  • HELPPPP!!!!!<br> my testt
    5·1 answer
  • Tom is burning CDs of music he loves. He can burn a CD in 4/5 of an hour. If he has 8 spare hours this week, find 8÷4/5, the num
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!