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
James runs laps around the park. The distance of a lap is d yards. On Monday, James runs 4 laps, Tuesday 3 laps, Thursday 5 laps
ra1l [238]

Answer:

d + 18

Step-by-step explanation:

6 0
3 years ago
the length of AB_ is 9 cm a dilation with a scale factor of 2 is applied to AB_ what is the length of the image of AB after the
Minchanka [31]

The scale factor of two means you need to multiply the original length by 2:

9 x 2 = 18

The new length would be 18 cm.

6 0
3 years ago
For the years from 2002 and projected to 2024, the national health care expenditures H, in billions of dollars, can be modeled b
dmitriy555 [2]

Answer:

2019.

Step-by-step explanation:

We have been given that for the years from 2002 and projected to 2024, the national health care expenditures H, in billions of dollars, can be modeled by H = 1,500e^{0.053t} where t is the number of years past 2000.

To find the year in which national health care expenditures expected to reach $4.0 trillion (that is, $4,000 billion), we will substitute H=4,000 in our given formula and solve for t as:

4,000= 1,500e^{0.053t}

\frac{4,000}{1,500}=\frac{ 1,500e^{0.053t}}{1,500}

\frac{8}{3}=e^{0.053t}

e^{0.053t}=\frac{8}{3}

Take natural log of both sides:

\text{ln}(e^{0.053t})=\text{ln}(\frac{8}{3})

0.053t\cdot \text{ln}(e)=\text{ln}(\frac{8}{3})

0.053t\cdot (1)=0.9808292530117262

\frac{0.053t}{0.053}=\frac{0.9808292530117262}{0.053}

t=18.506212320

So in the 18.5 years after 2000 the expenditure will reach 4 trillion.

2000+18.5=2018.5

Therefore, in year 2019 national health care expenditures are expected to reach $4.0 trillion.

7 0
4 years ago
0.1% of what number is 4?
nikklg [1K]

Let the number be x

Explanation:

  • 0.1 % of x = 4
  • 0.1 /100 × x = 4
  • 1 /1000 × x =4
  • x = 4 ÷ 1 /1000
  • x = 4 × 1000
  • x = 4000
3 0
2 years ago
Read 2 more answers
How do make number lines
devlian [24]

Answer:

Select the plain line in the Insert Shapes group. Place your cursor where you want a tick mark on your line, hold the "Shift" key, and drag to create a vertical mark. Holding the Shift key ensures a straight line.

Step-by-step explanation:

5 0
3 years ago
Other questions:
  • What is 26/8 written as a mixed number
    7·1 answer
  • During a bike challenge riders have to collect various colored ribbons each half mile they collect a red ribbon each 8th mile th
    11·1 answer
  • What’s the measure of the missing angles?
    9·1 answer
  • Sarah works at a zoo.
    9·2 answers
  • William Shakespeare died on his birthday at age 52.Approximately how many seconds did Shakespeare live
    5·2 answers
  • Wich method can you use yo decide wich of several integers has the greatest value?
    7·1 answer
  • A worker wants to save enough money to buy new
    9·1 answer
  • Fine t12 term in an arithmetic progression having t3=10 and t10=-4
    7·1 answer
  • Utility company charges 12 cents per kilowatt hour of electricity what is the daily cost of keeping a 50 watt bulb on for 12 hou
    12·1 answer
  • HELP IM STRUGGLING REAL BAD WITH THSI
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!