int main()
{
int number = 147; //Any number.
int res;
if(number)
res = number % 9 == 0 ? 9 : number % 9 ;
else
res = 0;
printf("%d", res);
getch();
}
int main()
{
int number = 147; //Any number.
int res;
if(number)
res = number % 9 == 0 ? 9 : number % 9 ;
else
res = 0;
printf("%d", res);
getch();
}