Jump to content

Archive:Sum and reverse of entered two numbers

From IdeaWazaWiki
Revision as of 02:58, 14 January 2007 by wikademia>JWSchmidt (format)
Sum and reverse of entered two nos

#include<stdio.h>
#include<conio.h>
void main()
{
short no,rev,sum,dig1,dig2;
clrscr();
printf("enter the 2 digit integer");
scanf("%d%d",&dig1,&dig2);
sum=dig1+dig2;
rev=dig2*10+dig1;
printf("sum=%d\nrev=%d\n",sum,rev);
getch();
}