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

wchenfeng

  • 博客园
  • 联系
  • 订阅
  • 管理

公告

上一页 1 2 3 4 5 6 7 8 9 ··· 32 下一页

2022年4月12日

输出字符串中的大写字母

摘要: 输出字符串中的大写字母 #includeint main(){ char a[100]; char *p; p=gets(a); while(*p) { if(*p>='A'&&*p... 阅读全文

posted @ 2022-04-12 20:04 王陈锋 阅读(136) 评论(0) 推荐(0)

输入十个数,求最大,最小值,平均数,和。

摘要: 输入十个数,求最大,最小值,平均数,和。 #includeint main(){ int a[10],i,sum=0,max,min; float average; for(i=0;ia[i]) min=a[i]... 阅读全文

posted @ 2022-04-12 20:04 王陈锋 阅读(137) 评论(0) 推荐(0)

Hanoi塔问题

摘要: Hanoi塔问题 #includeint move(int n,int x,int y,int z){ if(n==1) printf("%c-->%c\n",x,z); else { move(n-1,x,z,y); printf("%c-->%c\n... 阅读全文

posted @ 2022-04-12 20:04 王陈锋 阅读(11) 评论(0) 推荐(0)

使用递归,判断回文

摘要: 使用递归,判断回文 #include #includeint main(){ int begin ,end; char s[100]; gets(s); begin=0;end=strlen(s)-1; printf("%d",huiwe... 阅读全文

posted @ 2022-04-12 20:04 王陈锋 阅读(24) 评论(0) 推荐(0)

将十进制转换二进制,使用递归

摘要: 将十进制转换二进制,使用递归 #includeint main(){ int b; scanf("%d",&b); er(b);}int er(int n){ if(n>1) er(n/2); printf("%d",n%2);} ... 阅读全文

posted @ 2022-04-12 20:04 王陈锋 阅读(69) 评论(0) 推荐(0)

冒泡法与递归解决绝对值排序-99, 98, 102, -101, 100

摘要: 冒泡法与递归解决绝对值排序-99, 98, 102, -101, 100 #include #include void swap(int* a, int* b) { int tmp; tmp = *a; *a=*b; *b=tmp;}void printf_l... 阅读全文

posted @ 2022-04-12 20:04 王陈锋 阅读(38) 评论(0) 推荐(0)

利用递归求最大公因子

摘要: 利用递归求最大公因子 #includeint gys(int a,int b){ int c; if(a<b) { c=a;a=b;b=c; } if(b!=0) return gys(b,a%b); ... 阅读全文

posted @ 2022-04-12 20:04 王陈锋 阅读(23) 评论(0) 推荐(0)

Java关系运算符和逻辑运算符的使用

摘要: package com;public class app3_8 { public static void main(String[] args) { int a=25,b=7; boolean x=a5; //y... 阅读全文

posted @ 2022-04-12 20:03 王陈锋 阅读(67) 评论(0) 推荐(0)

统计1到a之间大于10的奇数的个数(2种写法)

摘要: 第一种 输入 20 输出 sum=5 #include int main(){ int a,sum=0;int i = 11; scanf("%d",&a); for (;i int main(){ int a,sum=0 i ... 阅读全文

posted @ 2022-04-12 20:03 王陈锋 阅读(53) 评论(0) 推荐(0)

Java将二个字符串合并成一个字符串

摘要: Java当中"abc"+"de"="abcde" ,类似c语言中的strcat函数。 输入 abc de 输出效果 package com;import java.io.*;public class strcat { public static... 阅读全文

posted @ 2022-04-12 20:03 王陈锋 阅读(1538) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 8 9 ··· 32 下一页
 
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3