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 on this ASAP pls 20 points
Semenov [28]

Answer:

1070cm2

Step-by-step explanation:

the cereal box represents a cuboid and it is closed hence a closed cuboid.

SA- Surface area

L- Length = 15

W- Width =4

H- Height =25

In a closed cuboid, there are going to be 6 faces( 3 pairs).

To find SA, we have to take the area of all faces and sum them up.

You can do this by carrying out the area of all faces and summing them up or you can use the formula:

SA of a closed cuboid=2(L x W) + 2(W x H)  + 2(L x H)

= 2(15 x 4) + 2(4 x 25) + 2(15 x 25)

= 2(60) + 2(100) + 2(375)

=120 + 200 + 750

=<u>1070cm2</u>

4 0
3 years ago
Which equation has an a-value of –2, a b-value of 1, and a c-value of 3? 0 = –2x2 + x + 3 0 = 2x2 + x + 3 0 = –2x2 + 3 0 = 2x2 –
Zolol [24]

ax² + bx + c = 0

You know:

a = -2

b = 1

c = 3

The 1st option is your answer

-2x² + x + 3 = 0

a = -2

b = 1

c = 3

6 0
3 years ago
Find the equation of the line perpendicular to y=−2 that passes through the point (4, −2).
Lerok [7]

x = 4

That's the equation

7 0
4 years ago
How many different arrangements of 3 letters can be formed if the first letter must be w or k​ (repeats of letters are​ allowed)
jekas [21]

Answer:

Total 1352 different arrangements can be formed.

Step-by-step explanation:

Total number of letters is 26 (a to z).

We need to find the arrangements of 3 letters

It is given that the first letter must be w or k and repetition of letters are allowed.

Since first letter can be w or k, therefore the possibilities for first letter is 2.

Repetition of letters are allowed and any letter can be formed in place of second and third letter.

So, the possibilities for second letter is 26 and possibilities for third letter is 26.

Total possibilities of arrangements of 3 letters is

P=2\times 26\times 26=1352

Therefore total 1352 different arrangements can be formed.

5 0
3 years ago
Jarred sells DVDs. His inventory shows that he has a total of 3,500 DVDs. He has 2,342 more contemporary titles than classic tit
cestrela7 [59]
X + y = 3,500 . . . (1)
x – y = 2,342 . . . (2)
(1) - (2) => 2y = 1158
y = 1158/2 = 579
x = 3500 - 579 = 2921

Therefore, he had 2,921 contempolary titles and 579 classic titles.
7 0
3 years ago
Read 2 more answers
Other questions:
  • Can someone plz help me I don’t understand plz explain
    11·1 answer
  • Find the answers to these two problems. PLEASE HELP!!
    6·1 answer
  • What’s the value of x?<br> 3x-24=x+10
    10·2 answers
  • How do you solve<br> 10x + 7 = 2(5x - 8) and <br>3(3b + 1) = 2(7b - 21)?
    12·1 answer
  • Which one of the following statements is true? (5 points)
    6·1 answer
  • Can someone help me with “Write The Following In Standard Form?” This is due in a few minutes please help!
    14·1 answer
  • I need help to do this is hard I promise if you answer I will follow you oh and show me the steps plis
    7·1 answer
  • Please help I will give you a brainliest and a thank you !!!!
    7·2 answers
  • Write and solve a proportion to answer the question.
    14·1 answer
  • 1. Which of the following is an irrational number? How do you know? Use key words and definitions to explain your answer choice.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!