#include <iostream>
using namespace std;

template <typename T>
T sumar(T a, T b)
{
    return a + b;
}

int main() {
    cout << "Suma de enteros: " << sumar(3, 5) << endl;
    cout << "Suma de dobles: " << sumar(2.5, 4.5) << endl;
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: