problem statement is here
#include<stdio.h>
int main()
{
int a,n,i,m,j,p,o,t,s,c,l;
scanf("%d",&a);
int ar[a];
for(i=0;i<a;i++)
{
c=0;s=0;j=0;
scanf("%d %d",&n,&m);
while(n!=0)
{
p=n%10;
c=c*10+p;
n=n/10;
}
while(m!=0)
{
o=m%10;
s=s*10+o;
m=m/10;
}
t=s+c;
while(t!=0)
{
l=t%10;
j=j*10+l;
t=t/10;
}
printf("%d\n",j);
}
return 0;
}
No comments:
Post a Comment