C Program to Condense a number
#include<stdio .h="">
#include<conio .h="">
void cn(int n)
{
int i=0,c=0,r=0;
while(n!=0)
{
i++;
r=n%10;
c=c+r;
n=n/10;
}
if(i>1)
cn(c);
else
printf("\n Condensed Number : %d",c);
}
void main()
{
int num,c;
clrscr();
printf("\n Enter Number: ");
scanf("%d",&num);
cn(num);
getch();
}
**************** OUTPUT ********************
Enter Number: 98
Condensed Number: 8</conio></stdio>