幸运数字

#include <stdio.h>
 
int main()

    int n; 
    while (scanf("%d", &n) != EOF) 
    { 
        int t = n, s = 0; 
        while (t)   

        { 
            s += t % 10;
 
            t /= 10;
        } 
        if (n % s == 0) printf("yes\n");
        else printf("no\n");
    } 
    return 0;

posted @ 2013-12-09 23:25  Luken  阅读(127)  评论(0)    收藏  举报