run time error in spoj revres number

addition
reverse
runtime
runtime-error
spoj

#1

#include
#include
#include<stdio.h>
#include
#include<math.h>
using namespace std;
int main()
{
int num,i;
int result[1000];
cin>>num;
string s[1000];
for( i=0;i<num;i++)
{ fflush(stdin);
getline(cin,s*);
}

for( i=0;i<num;i++)

{

  string c=(" ");

 int found=s*.find(c);




 string sub1,sub2;

sub1=s*.substr(0,found );
sub2=s*.substr(found+1,s*.size());

   reverse(sub1.begin(),sub1.end());

reverse(sub2.begin(),sub2.end());

char *s1=&sub1[0];
char *s2=&sub2[0];

int s11=atoi(s1);

int s12=atoi(s2);

int sum=s11+s12;

int k=sum;

sum=0;
double j=0;
while(k!=0)

{
sum=sum*pow(10,1)+k%10;
k=k/10;
j++;
}

result*=sum;

}

for(int i=0;i<num;i++)
{
cout<<result*<<endl;

}

return 0;
}


#2

a link to the problem, an explanation of your algorithm. and some proper formatting would be helpful