By Patrick Celedio
In order to write a function that computes the sum of two integers, all we need are three
int
variables: two that store each addend, and one that will be used to store the sum.
A very simple program, one may write this up:
Which will definitely work. However, we can omit the line containing ‘c=a+b’ as we are allowed to return formulas or equations.
From here, we save a line of code for a function that is already so simple.