习题6.17

来源:互联网 发布:淘宝站外营销 编辑:程序博客网 时间:2024/06/04 23:29
#include <stdio.h>#include <stdlib.h>int main(){    int a,b,c;//a十元,b五元,c一元    int count=1;    for(a=1;a<=9;a++)    {    for(b=1;b<=19;b++)    {      c=50-a-b;    if(10*a+b*5+c==100)    {      printf("10元:%d 五元:%d 一元:%d\n",a,b,c);      printf("兑换方案:%d\n");      count++;    }    }    }    return 0;}

这里写图片描述