- 博客(2)
- 收藏
- 关注
原创 常用的几个程序
1. 逆序输出 #include <stdio.h> int main() { int x,t; scanf("%d",&x); while(x>0) { t=x%10; //获取最后一位数字 printf("%d",t); x/=10; //获取去掉最后一位数字的其他数字 } return 0; }
2021-06-04 20:42:21 412
原创 用硬币凑金额
#include <stdio.h> int main() { int one,two,five; int x; printf("请输入你要凑的额度。\n"); scanf("%d",&x); for(one=1;one<x*10;one++) { for(two=1;two<x*10/2;two++) { for(five=1;five<x*10/5;five++) { if(one+two*2+five*5==x*10) .
2021-05-28 10:59:58 149 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人