#include < cmath > #include < cstdio > #include < vector > #include < iostream > #include < algorithm > #include < cassert > using namespace std; /*Write the class AddElements here*/ template < class T> class AddElements{ protected : T obj; public : AddElements(T ob) { obj=ob; } T add(T var) { obj=obj+var; return obj; } T concatenate(T var) { obj=obj+var; return obj; } }; int main () { int n,i; cin >> n; for (i= 0 ;i<n;i++) { string type; cin >> type; if (type== "float" ) { double element1,element2; cin >> element1 >> element2; AddElements< double > myfloat (element1); cout << myfloat.add(element2) << endl; } else if (type == "int" ) { int element1, element2; cin >> element1 >> element2;