Cod sursa(job #310099)
Utilizator | Data | 1 mai 2009 19:26:21 | |
---|---|---|---|
Problema | A+B | Scor | 100 |
Compilator | cpp | Status | done |
Runda | tot | Marime | 0.27 kb |
#include<iostream.h>
#include<fstream.h>
using namespace std;
template <class Tip>
Tip suma(Tip A,Tip B)
{
Tip S;
S=A+B;
return S;
}
int main()
{
long a,b;
ifstream f("adunare.in");
ofstream g("adunare.out");
f>>a>>b;
g<<suma(a,b)<<'\n';
return 0;
}