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

wchenfeng

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

公告

上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 32 下一页

2022年4月12日

(第2种)编写一个程序,其有宏定义FUN(x),可用于计算x*2+x*2+x*2,实现从键盘输入一个实数a,输出FUN(a),FUN(a+1),FUN(a)*2的值。

摘要: #include#define FUN(x) x*2+x*2+x*2 //补充宏定义内容void main(void){ int a; scanf("%d", &a); printf("%d\n", FUN(a)); printf("... 阅读全文

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

编写一个结构体数组查找函数find,若找到则输出该结构体变量,否则输出未找到。

摘要: #include #include typedef struct { int num; char name[20]; int score;} stu;int find(stu list[], int list_len, char *find_... 阅读全文

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

(2种)编写一个函数funchar(char *a,char *b,char *c)实现如下功能:将在第一个字符串中出现的但在第二个字符串未出现的字符放在第三个字符串中,函数返回第三个字符串的长度。

摘要: #include#includetypedef struct zimu{ char a[32]; char b[32]; char c[32];}str;int main(){ int i,k=0,j,t=0; str x={0}; scanf("%s",&x... 阅读全文

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

c语言中0.f例子

摘要: #includeint main(void){ double a=22222.22222; printf("a=%0.5f\n",a); return 0;} 阅读全文

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

c语言第一步hello world

摘要: #include int main(void){ printf("hello world"); return 0;} 阅读全文

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

输入一串数字,输出分开的数字。例如123,输出1 2 3

摘要: #include #include int main(){ int a, i, c, b, t; scanf("%d", &a); t = a; i=0; while (t > 0) { t = t /... 阅读全文

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

输入一个字符,输出它的ascii

摘要: #include int main() { char ch; scanf("%c",&ch); printf("%d",ch); return 0; } 阅读全文

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

c语言中i++与++i区别

摘要: #includeint main(void){ int i=5,y; y=i++*++i; printf("i=%d\n",i); printf("y=%d\n",y); i=5; y=i++*i++; printf("i=%d\n",i); printf("... 阅读全文

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

编写一个程序,其有宏定义FUN(x),可用于计算x*2+x*2+x*2,实现从键盘输入一个实数a,输出FUN(a),FUN(a+1),FUN(a)*2的值。

摘要: #include#define FUN(x) x*2+x*2+x*2int main(){ int a,b,c; scanf("%d",&a); b=a+1;c=FUN(a); printf("%d\n",FUN(a)); printf("%d\n",FUN(... 阅读全文

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

输入学号,名字,年龄进行排序。(可控人数)(结构体)利用年龄进行排序。

摘要: #include #include #include #define N 5typedef struct student{ char num[10]; char name[20]; int age;}stu;void swap_student(stu *... 阅读全文

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

上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 32 下一页
 
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3