#include <stdio.h>
#define digit 21
int main()
{
int a, b, max;
int i = 0;
int j = 0;
int x[digit - 1] = { 0 };
int y[digit - 1] = { 0 };
int z[digit] = { 0 };//result
printf("Input the first number:\n");
scanf("%d", &a);
printf("Input the second number:\n");
scanf("%d", &b);
while ( a != 0 ) {
x[i] = a % 10;
i++;
a /= 10;
}
while ( b != 0 ) {
y[j] = b % 10;
j++;
b /= 10;
}
max = i;
if ( j i ) {
max = j;
}
for ( ; max >= 0; max--) {
z[max] = x[max] + y[max];
if ( z[max] >= 10 ) {
z[max+1]++;
z[max] -= 10;
}
printf("%d", z[max]);
}
printf("\n");
return 0;
}