Pagini recente » Cod sursa (job #2524006) | Cod sursa (job #613765) | Cod sursa (job #1454972) | Cod sursa (job #3202493) | Cod sursa (job #3184821)
# Open the input file containing two numbers, each on its own line.
input = open("adunare.in", "r")
# Open the output file for writing.
output = open("adunare.out", "w")
# Read the input file and split at linebreak, saving the resulting array.
content = input.read().splitlines()
# Store the first two values.
a = int(content[0])
b = int(content[1])
# Write to the output file the string representation of the sum of the two values.
output.write(str(a+b))