/*100-1000的各位数字和被15整除c语言*/
/*100-1000的各位数字和被15整除c语言*/
int 数字(100), 和(0), 位数 = 数字;
do
{
do
{
和 += 位数 % 10;
} while (位数 /= 10);
if (!(和 % 15))
cout << 数字 << endl;
位数 = ++数字;
和 = 0;
} while (数字 <= 1000);
int 位数(int 数){ int 位 = 1; while (数 /= 10) ++位; return 位; }