Pagini recente » Cod sursa (job #238220) | Cod sursa (job #726805) | Cod sursa (job #968938) | Diferente pentru problema/fft intre reviziile 10 si 9 | Cod sursa (job #3030725)
#include <bits/stdc++.h>
using namespace std;
ifstream f("evaluare.in");
ofstream g("evaluare.out");
char s[1001];
int i;
int I();
int II();
int main()
{
f>>s;
i=0;
g<<I();
return 0;
}
int I()
{
int r=II();
while(s[i]=='+')
{
i++;
r=r+II();
}
return r;
}
int II()
{
int r=0;
while(s[i]>='0'&&s[i]<='9')
{
r=r*10+(s[i]-'0');
i++;
}
return r;
}