编辑代码

#include <stdio.h>
int main () {
    //JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。 
    int x, exit;
    int one, two, five;
    scanf("%d", &x);
    for ( one = 1; one < x*10; one++){
        for ( two = 1; two < x*5; two++){
            for ( five = 1; five < x*2; five++){
                if ( one + two*2 + five*5 == x*10){
                    printf("可以用%d张1角加%d张2角加%d张5角得到%d元\n", one, two, five, x);
                    goto out;
                }
            }
        }
    }
out:
    return 0;
}