C program to add reversed number with Original Number ?
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<string.h>
void main()
{
int num1, num2;
char str[10];
clrscr();
printf("\nEnte the Number : ");
scanf("%d",&num1);
sprintf(str,"%d",num1);
strrev(str);
num2 = atoi(str);
printf("\nReversed Number + Original Number = %d ",num1 + num2 );
getch();
}

Ente the Number : 123 Reversed Number + Original Number = 444
Explanation Of Logic
Bookmark & Share








0 comments:
Post a Comment
Your Feedback : This is Growing Site and Your Feedback is important for Us to improve the Site performance & Quality of Content.Feel Free to contact and Please Provide Name & Contact Email