Addition with Function Templates

# Introduction In this lab, you are required to create a program that adds two numbers using function templates, where the function template `add_numbers()` returns the sum of the provided numbers of type `T`, and in the `main()` function, two integer variables `n1` and `n2`, and two double variables `n3` and `n4` are created and their inputs are obtained, followed by calling the `add_numbers()` function for integer type and storing the return value in the `sum_integer` variable, and then calling the `add_numbers()` function for double type and storing the return value in the `sum_double` variable, and finally printing the values of `sum_integer` and `sum_double`.

|60 : 00

Click the virtual machine below to start practicing