#include <stdio.h>
#include <string.h>
int main()
{
long int n;
char ch[20];
int i,len,sum=0;
scanf("%ld",&n);
if(n<0)
n=-n;
sprintf(ch,"%ld",n);
len=strlen(ch);
for(i=0;i<len;i++)
sum+=ch[i]-'0';
printf("%dæ¯ä¸ä¸ª%dä½æ°çæ´æ°\n",n,len);
printf("åä½æ°çå= %d\n",sum);
return 0;
}
示ä¾è¿è¡ç»æï¼
12345678
12345678æ¯ä¸ä¸ª8ä½æ°çæ´æ°
åä½æ°çå= 36