Find Generic root of number


#include <stdio.h>
int main()
{        

int num,i;
printf("Enter any number: ");
scanf("%d",&num);
printf("Generic root: %d", (i = num % 9) ? i : 9);
return 0;
}

Labels