#include #include int main(void) { int n; /* the number being reduced to its digital root */ int nn; /* temporary variable for the calculation */ int orign; /* variable to keep the value of n as given by user */ printf("Please enter a non-negative integer: "); if ( scanf("%d",&n) != 1 || n < 0 ) { printf("Bad input!\n"); return EXIT_FAILURE; } /* Complete the program to compute the digital root. The digital root should be left in n , and the original value of n in orign. */ /* BEGIN ANSWER -- do not delete this line */ // ADD YOUR CODE HERE /* END ANSWER -- do not delete this line */ printf("The digital root of %d is %d\n",orign,n); return EXIT_SUCCESS; }