要求:1、将程序源程序内容复制到答案栏中,并且,将程序的运行结果以图片形式上交到答案栏中(运行结果截图中,需要保留窗口最上方程序名)
你题目的解答代码如下:(如有帮助,望采纳!谢谢! 点击我这个回答右上方的【采纳】按钮)
#include<stdio.h>
int main()
{
int i,x=0,n,s;
for(i=100;i<=700;i++){
n = i;
s = 0;
while (n>0)
{
s += n%10;
n /= 10;
}
if(s==15){
printf("%d ",i);
x++;
if (x%5==0)
printf("\n");
}
}
return 0;
}