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
klasskru [66]
3 years ago
8

Write a recursive method to form the sum of two positive integers a and b. Test your program by calling it from a main program t

hat reads two integers from the keyboard and users your method to complete and print their sum, along with two numbers.
Computers and Technology
1 answer:
77julia77 [94]3 years ago
5 0

Answer:

see the code snippet below writing in Kotlin Language

Explanation:

fun main(args: Array<String>) {

   sumOfNumbers()

}

fun sumOfNumbers(): Int{

   var firstNum:Int

   var secondNum:Int

   println("Enter the value of first +ve Number")

   firstNum= Integer.valueOf(readLine())

   println("Enter the value of second +ve Number")

   secondNum= Integer.valueOf(readLine())

   var sum:Int= firstNum+secondNum

  println("The sum of $firstNum and $secondNum is $sum")

   return sum

}

You might be interested in
How to add a bill using the reciept capture?
HACTEHA [7]

Answer: add up all the numbers and then add the tax and then 30% of the total for the tax

Explanation:

like 3+6+8+10=26

26 30%=whatever that is and then add it all up againg and thta is your answer.

5 0
3 years ago
A.) Write a code statement to assign the value 7.3 to a variable with an identifier<br> timer.
Georgia [21]

The code segment that assigns value to the variable named timer is:

timer = 7.3

<h3>How to write the code</h3>

To assign a value to a variable, we make use of the following syntax:

variable = value

In this case;

The variable is timer and the value is 7.3

Hence, the required code segment is: timer = 7.3

Read more about code segments at:

brainly.com/question/18430675

8 0
2 years ago
When should you integrate technology?​
earnstyle [38]
Nolur acil lütfen yalvarırım yalvarırım lütfen yalvarırım when should you integrate technology?
5 0
3 years ago
Read 2 more answers
Some students are studying the amount of pollution in a river They are using a computer to measure the pollution level using sen
Tpy6a [65]

Answer:

optical sensors

Explanation:

optical sensors measure the amount of gases like carbon dioxide and carbon monoxide in the air

4 0
3 years ago
How to plot probability density function on desmos
sertanlavr [38]

Answer:

Explanation:

6 0
3 years ago
Other questions:
  • Variable names may contain spaces and punctuation symbols. True False
    15·1 answer
  • Mention any six profession related to tourism
    6·2 answers
  • Where may an operating system reside in a mobile device?
    5·1 answer
  • In a(n) ________ either one condition or some other condition must be met in order for an event to take place.
    11·1 answer
  • Which is the correct expansion of the term Internet? 
    9·2 answers
  • What is the purpose of a destructor? (g) What is the purpose of an accessor?
    7·1 answer
  • Andrew works for a company that develops for a company that develops optic-fiber cables for transmission of data. which layer of
    14·1 answer
  • How do i get the schools admin password for the good wifi
    10·2 answers
  • Electronic cover letters are longer than traditional paper cover letters.
    13·2 answers
  • What are some good apps to download to screenshot your screen?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!