#include <stdio.h> main() { int n,m,sum=0; scanf("%d",&n); m=n%10; sum=sum+m; printf("%d",m); n=n/10; while(n!=0) { m=n%10; sum=sum+m; printf("+%d",m); n=n/10; } printf("=%d\n",sum); }
标签:求该,10,sum,n%,整数,数码,printf From: https://www.cnblogs.com/lachesism/p/16732937.html