Showing posts with label Find Generic root of number. Show all posts
Showing posts with label Find Generic root of number. Show all posts

Friday, February 1, 2013

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;
}