• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






tyjd

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2024年10月9日

以角拆分十元情况列举(for循环的反复嵌套使用)以及其跳出的两种方式
摘要: include <stdio.h> int main () { int x; int one,two,five; scanf ("%d",&x); for (one=0;one<x10;one++){ for(two=0;two<x10/2;two++){ for(five=0;five<x10/5 阅读全文
posted @ 2024-10-09 16:47 天厌九道 阅读(12) 评论(0) 推荐(0)
 
判断是否为素数
摘要: include <stdio.h> int main () { int n=1; int x; scanf("%d",&x); int biaozhi=1; for (n=2;n<x;n++){ if(x%n0 ){ biaozhi=0;此处可加break;} } if (biaozhi0)prin 阅读全文
posted @ 2024-10-09 15:40 天厌九道 阅读(26) 评论(0) 推荐(0)