Ask Question

Create a program that can be used to add two integers together. In the beginning, the user is asked to give two integers that are to be summed. The program then prints the formula that describes the addition of the numbers.

+2
Answers (1)
  1. 25 May, 15:23
    0
    Answer written in python.

    Explanation:

    #ask user for the first integer.

    first_number = int (input ("enter first number: "))

    #ask user for the second integer

    second_number = int (input ("enter second number: "))

    #add both and store in a variable, result.

    result = first_number + second_number

    #print out the result

    print (f"the answer to the problem is {result} calculated by adding {first_number} to {second_number}")

    The worded lines after the # sign are called comments and are used to describe what the following lines of code does making it easier to read and understand by other programmers or by the same programmer coming back to it after a while.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Create a program that can be used to add two integers together. In the beginning, the user is asked to give two integers that are to be ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers