#include<stdio.h>
int main()
{
int num;
int rev_num = 0, R=0,s=0;
int N,t;
scanf("%d",&num);
N=num;
t=num;
while(t !=0)
{
rev_num = rev_num*10 + t%10;
t = t/10;
}
R=rev_num;
s=N+R;
printf("%d",s);
}
Thanks
Happy Computing !
int main()
{
int num;
int rev_num = 0, R=0,s=0;
int N,t;
scanf("%d",&num);
N=num;
t=num;
while(t !=0)
{
rev_num = rev_num*10 + t%10;
t = t/10;
}
R=rev_num;
s=N+R;
printf("%d",s);
}
Thanks
Happy Computing !
No comments:
Post a Comment