CJCoding With Joseph
15free / daySign inCreate account

Modular programming means breaking a job into small reusable functions. Write two functions:

1) int triple(int n) that returns n * 3. 2) int tripleSum(int a, int b) that returns the sum of tripling each value. It must CALL triple(...) instead of multiplying by 3 again.

Do NOT write a main function.

Expected output

15
27

= newline. The output ends with a newline, so print one after the last line.

Hints4 available
Topics
Modular Programming
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cout, fori)

Your output

Run your code to see the output here...

Test cases

Run your code to see test case results.