Home > Enterprise >  Digital Root in c
Digital Root in c

Time:03-31

So you have to do:

11 = 1 1 = 2

3578 = 3 5 7 8 = 23 = 2 3 = 5

But the problem is that the number can be very large(consist of 10,000 digits)

#include <stdio.h>
#include <ctype.h>

int main(){
    char buffer[100000];
    scanf("           
  • Related