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
Jason would like to estimate the probability of heads coming up more than once in 3 coin flips. To do this, he has a computer ra
Umnica [9.8K]
The total number of tries = 10

The tries are  { <span>110 111 100 000 101 111 100 000 011 010  }
</span><span />
Where: 0 representing heads and 1 representing tails

The tries which are heads came up more than once in 3 coin flips { 100 000 100 000 010  }

The number of the tries which are heads came up more than once in 3 coin flips = 5

∴ The probability of heads coming up more than once in 3 coin flips = 5/10 = 1/2

5 0
3 years ago
684,658 round to the nearest hundred thousand
OverLord2011 [107]
700,000 is the answer I believe
8 0
3 years ago
Read 2 more answers
)) Ms. Terry runs the school cafeteria. In October, she had to order 15 cases of chocolate
Anna11 [10]

Answer:

I think number 2 is the answer, but 4 could be the answer.

7 0
2 years ago
Read 2 more answers
Someone must have beaten me here. Devora thinks, dismayed by the empty treasure chest. Then, just as she's about to close the li
Sidana [21]

Answer:

she turned 82 degrees.

Step-by-step explanation:

Suppose, the unknown angle is A

Now, we know that according to the sine law ,

the ratio of side of a triangle and the sine value of the angle opposite to that side is same . It says that,

if a triangle has 3 sides a,b and c and 3 angles A,B,and C and they are opposite to the sides respectively then,

a/SinA=b/sinB=c/SinC

check the image below in attachment.

From the diagram at attachment.

here , angle A is required.

given, angle C= 30

side b=89 m and c= 48 m

sin law says a/sinA=b/sinB=c/sinC

first we take , b/sinB=c/sinC

or, 89/sinB= 48/sin30

or, sinB=( 89×0.5)/48 =0.92

or, B=68

we know, in every triangle , the sum of 3 angles of a triangle is 180

then, A+B+C=180

or, A=180-B-C= 180 - ( B+C)

=180-(68+30)

or, A = 82

therefore , the required angle is 82 degree.

she turned 82 degrees.

8 0
3 years ago
What’s the average of the following set of numbers ( 7,5,4,9)
Eduardwww [97]

Answer:

6.25

Step-by-step explanation:

We\ are\ given:\\Observations\ in\ the\ Set=(7,5,4,9)\\ As\ we\ know\ that,\\ Average\ or\ interchangeably\ mean=\frac{Total\ Sum\ of\ observations }{Total\ no.\ of\ observations} \\Here,\\Total\ sum\ of\ the\ observations=7+5+4+9=25\\Total\ number\ of\ observations=4\\Hence\ here,\\Mean/Average=\frac{25}{4}=6.25

6 0
3 years ago
Other questions:
  • Chad sells custom T-shirts with five of his friends. If the earnings are divided evenly, how much must the business make in orde
    9·1 answer
  • 98 POINTS AND BRAINLYIST IF RIGHT!!!!
    6·2 answers
  • On Friday afternoon, 560 people went to the local theater for the matinee. Youth tickets cost 5.75 and adult tickets cost 8.50.
    13·1 answer
  • Ten samples of a process measuring the number of returns per 100 receipts were taken for a local retail store. The number of ret
    11·1 answer
  • If the equation of a line is y= - 2/3 x - 2 at what.point on the graph would I find the y- intercept?
    10·2 answers
  • What is the midpoint of a line segment with endpoints at (3,-1) and (8, -4)?
    7·2 answers
  • Use the coordinate plane to plot the point (3, 6). Then complete the statements that explain how to plot the point. Start at the
    10·2 answers
  • A total of 438 tickets were sold for the school play. They were either adult tickets or student tickets. There were 62 fewer stu
    5·1 answer
  • 5. Place a number in each blank box to order the numbers from least to<br> greatest in value.
    14·1 answer
  • 8-kg lead brick falls from a height of 1.6 m.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!