#include <stdio.h> int main(){ int n,c=0; if (scanf("%d",&n)!=EOF){ // 计算150,分配给5,2,1,总数得是100 for (int i=1;i<30;i++){ for (int j=1;j<75;j++){ c = 100-i-j; if (150==5*i+2*j+c && i<=n){ printf("%d %d %d\n",i,j,c); } } } } else{ printf("input wrong"); } return 0; }
c语言编程练习题:7-101 人民币兑换
作者:yunjinqi
类别:编程
日期:2023-05-31 11:17:06
阅读:604 次
消耗积分:0 分
版权所有,转载本站文章请注明出处:云子量化, https://www.yunjinqi.top/article/226
最新文章
系统当前共有 404 篇文章