83.3k views
2 votes
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.

1 Answer

5 votes

Answer:

Answer written in python.

Step-by-step 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.

User Mark Lagendijk
by
5.4k points