2.思路设计
3.程序流程图
4.代码实现
#include<bits/stdc++.h> using namespace std; main() { int x, y, z, count=1; printf("可能的兑换方法如下:\n"); for(x=0;x<=50;x+=10) for(y=0;y<=50-x;y+=5) for(z=0;z<=50-x-y;z++) if(x+y+z == 50) { printf(count%3?"%d: 10*%d+5*%d+1*%d\t":"%d:10*%d+5*%d+1*%d\n", count++,x/10,y/5,z); } }
5.测试截图
标签:int,namespace,5.25,printf,打卡,main From: https://www.cnblogs.com/binglinll/p/17430620.html