ava212101
ava212101 ava212101
  • 11-09-2020
  • Mathematics
contestada

how to combine two integers​

Respuesta :

philiamokonin
philiamokonin philiamokonin
  • 11-09-2020

The simplest approach to do this is:

Convert both numbers to string

Concatenate both strings into one, as this is comparatively easy

Convert this concatenated string back to integer

Step-by-step explanation:

Given two integers n1 and n2, the task is to concatenate these two integers into one integer.

Example:

Input: n1 = 12, n2 = 34

Output: 1234

Input: n1 = 1, n2 = 93

Output: 193

Answer Link

Otras preguntas

I need help please she thank you
Point E is on line segment DF. Given DE = 2x, EF = 2x – 6, and DF = 3x + 5, determine the numerical length of EF. Answer: EF =
Write a two paragraph essay, state and defend a claim about whether or not asteroid mining is something worth doing.
what number set does 24 belong to?
Carson needs 3 quarts of water to make fruit punch, but has only a 1-cup measuring cup. She knows there are 2 cups in 1 pint, and 2 pints in 1 quart. How can Ca
What is the image point of (-7,4) after a translation left 3 units and up 5 units
describe what geography is all about.
What is the mass of a 500.00 mL sample of seawater with a density of 1.025 g/mL?
You found hardwood flooring priced by the square foot. To find the price per square yard, you should do which of the following.a.) Divide the price per square f
your 7. What do you think about science? What do you like? What do you dislike? Support your answer with details from experiences. Write a paragraph consisting