摘要: 这里就放一下运行之后的文件变化。具体内部截图就不放了。 #include <stdio.h> #include <stdlib.h> #include <string.h> const int N = 10; // 定义结构体类型struct student,并定义其别名为STU typedef s 阅读全文
posted @ 2019-12-31 22:02 咒怨灬流星 阅读(117) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> const int N=5; // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; int score; 阅读全文
posted @ 2019-12-22 16:59 咒怨灬流星 阅读(115) 评论(0) 推荐(0)
摘要: a+i为元素地址,a[i]为元素。 ,*q+j和*(*q+j)分别表示什么 前者是地址后者是内容。 // 练习:使用二分查找,在一组有序元素中查找数据项 // 形参是数组,实参是数组名 #include <stdio.h> #include <stdlib.h> const int N=5; int 阅读全文
posted @ 2019-12-17 13:15 咒怨灬流星 阅读(138) 评论(1) 推荐(0)
摘要: 验证性实验 #include<stdio.h> #include<stdlib.h> #define N 100 void fun(int x[N][N],int n) { int i,j; for(i=1;i<=n;i++) for(j=1;j<=n;j++) if(j>=i ) x[i][j]= 阅读全文
posted @ 2019-12-02 16:05 咒怨灬流星 阅读(122) 评论(1) 推荐(0)
摘要: //一元二次方程的 #include<stdio.h> #include<math.h> int main () { double a,b,c,x1,x2; double delat,real,imag; while(scanf("%lf %lf %lf",&a,&b,&c)){ if(a==0) 阅读全文
posted @ 2019-11-18 16:55 咒怨灬流星 阅读(94) 评论(2) 推荐(0)
摘要: /* 《C语言程序设计教程学习指导》p118 实验内容(1) 这是一个常用格式控制符使用示例 运行程序,观察行结果,对照每一行printf()中的格式控制符,理解其功能和用法 */ #include <stdio.h> int main() { int x=1234; float f=123.456; double m=123.456; char ch='a'; char a[]="Hello, 阅读全文
posted @ 2019-11-03 12:45 咒怨灬流星 阅读(151) 评论(2) 推荐(0)
摘要: #include int main() { printf("201983270563\n"); return 0; } #include int main() { int x ; printf("输入一个整数:\n"); scanf("%d,&x"); if(x%2==0) printf("是偶数"); else printf("是奇数"); return 0 ... 阅读全文
posted @ 2019-10-22 00:23 咒怨灬流星 阅读(83) 评论(0) 推荐(0)