#include <stdio.h>
int main (void){
int num;
printf("welcome to the word of factorial"); printf(" \n plrease enter the number: "); int copy=num;
int sum=0;
while(num>0){
sum +=num % 10;
num/=10;
}printf("the sum of all digits in %d is %d",copy
,sum
); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbiAodm9pZCl7ICAKCWludCBudW07CglwcmludGYoIndlbGNvbWUgdG8gdGhlIHdvcmQgb2YgZmFjdG9yaWFsIik7CglwcmludGYoIiBcbiBwbHJlYXNlIGVudGVyIHRoZSBudW1iZXI6ICIpOwoJc2NhbmYoIiVkIiwmbnVtKTsKCWludCBjb3B5PW51bTsKCWludCBzdW09MDsKCXdoaWxlKG51bT4wKXsgCglzdW0gKz1udW0gJSAxMDsKCW51bS89MTA7Cgl9cHJpbnRmKCJ0aGUgc3VtIG9mIGFsbCBkaWdpdHMgaW4gJWQgaXMgJWQiLGNvcHksc3VtKTsKCXJldHVybiAwOyAKfQ==