会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
梁莞周
博客园
首页
新随笔
联系
订阅
管理
2019年12月31日
实验七
摘要: part1 实验验证2 运行正确 验证实验3 #include <stdio.h> #include <stdlib.h> #define N 10 // 定义一个结构体类型STU typedef struct student { int num; char name[20]; int score;
阅读全文
posted @ 2019-12-31 23:29 梁莞周
阅读(155)
评论(2)
推荐(0)
2019年12月24日
实验6
摘要: part1 ex1-2 #include <stdio.h> #include <stdlib.h> const int N=5; // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20];
阅读全文
posted @ 2019-12-24 08:58 梁莞周
阅读(152)
评论(2)
推荐(0)
2019年12月18日
实验5
摘要: part1 区别:指向数组元素的指针是一个含有多个指针的数组;而指向一维数组的指针是一个指向含有多个元素的一维数组的指针。 选择:AE part2 ex2-1-1 // 练习:使用二分查找,在一组有序元素中查找数据项 // 形参是数组,实参是数组名 #include <stdio.h> #inclu
阅读全文
posted @ 2019-12-18 00:23 梁莞周
阅读(145)
评论(3)
推荐(0)
2019年12月2日
实验4
摘要: // 函数fun()的功能是: 找出能够被x整除并且是偶数的数, // 把这些数保存在数组bb中,并按从大到小的顺序输出。 // 例如,当x=20时,依次输出: 20 10 4 2。 #include <stdio.h> #include <stdlib.h> void fun(int k,int
阅读全文
posted @ 2019-12-02 23:45 梁莞周
阅读(97)
评论(1)
推荐(0)
2019年11月18日
实验3
摘要: part1:// 一元二次方程求解 // 重复执行, 直到按Ctrl+D或Ctrl+E结束 // #include <math.h> #include <stdio.h> #include <stdlib.h> int main() { float a, b, c, x1, x2; float de
阅读全文
posted @ 2019-11-18 10:52 梁莞周
阅读(156)
评论(4)
推荐(0)
2019年11月6日
实验2
摘要: part1:#include <stdio.h> int main() { int x=1234; float f=123.456; double m=123.456; char ch='a'; char a[]="Hello, world!"; // 定义一个数组a,数组中连续存放了字符串常量he
阅读全文
posted @ 2019-11-06 06:51 梁莞周
阅读(165)
评论(3)
推荐(0)
2019年10月22日
实验
摘要: #include<stdio.h> int main() { printf("201983270487"); return 0 ; } #include<stdio.h> int main() { printf("火星,你好"); return 0 ; } # include<stdio.h> int main() { int x; printf("输入一个整数:\n"); scanf("%d",
阅读全文
posted @ 2019-10-22 22:16 梁莞周
阅读(89)
评论(0)
推荐(0)
根据输入,大写与小写的转换
摘要: # include<stdio.h> int main() { char ch; printf("输入一个字符:\n"); scanf("%c",&ch); if(ch>='a'&&ch<='z') ch=ch-'a'+'A'; printf("%c\n",ch); return 0; }
阅读全文
posted @ 2019-10-22 17:56 梁莞周
阅读(112)
评论(0)
推荐(0)
根据不同输入,显示不同信息
摘要: #include int main() { int days; printf("输入一个整数;\n"); scanf("%d",&days); if(1<=days&&days<=5) printf("workdays,fighting\n"); else if (days==7||days==6) printf("weekend,...
阅读全文
posted @ 2019-10-22 13:02 梁莞周
阅读(145)
评论(0)
推荐(0)
公告