摘要: #include <stdio.h> #include <string.h> #include <stdlib.h> const int N = 10; typedef struct student { long int id; char name[20]; float objective; flo 阅读全文
posted @ 2020-12-29 09:19 赖梓贤 阅读(76) 评论(0) 推荐(0) 编辑
摘要: // 运行程序输入测试时,可以把N改小一些输入测试 typedef struct student { int id; /*学生学号 */ char name[20]; /*学生姓名 */ char subject[20]; /*考试科目 */ float perf; /*平时成绩 */ float 阅读全文
posted @ 2020-12-20 10:27 赖梓贤 阅读(46) 评论(1) 推荐(0) 编辑
摘要: #include <stdio.h> #include <string.h> const int N = 5; void selectSort(char str[][20], int n ); // 函数声明,形参str是二维数组名 int main() { char name[][20] = {" 阅读全文
posted @ 2020-12-13 10:47 赖梓贤 阅读(73) 评论(1) 推荐(0) 编辑
摘要: #include <math.h> #include <stdio.h> void solve(double a, double b, double c); int main() { double a, b, c; printf("Enter a, b, c: "); while(scanf("%l 阅读全文
posted @ 2020-11-28 09:03 赖梓贤 阅读(57) 评论(1) 推荐(0) 编辑
摘要: #include <math.h> #include<stdio.h> int main (){ float a, b, c, x1, x2; float delta, real, imag; printf("Enter a, b, c: "); while(scanf("%f%f%f%f",&a, 阅读全文
posted @ 2020-11-15 13:51 赖梓贤 阅读(50) 评论(1) 推荐(0) 编辑
摘要: #include <stdio.h> int main() { int a=5, b=6, c=100, d, e, f; d=a/b*c; e=a*c/b; f=c/b*a; printf("d=%d, e=%d, f=%d\n",d,e,f); return 0; } #include <std 阅读全文
posted @ 2020-10-31 11:18 赖梓贤 阅读(80) 评论(1) 推荐(0) 编辑
摘要: /* A simple program */ #include <stdio.h> int main() { printf("My stuno is 202083450033\n2020, do you fine"); return 0; } /*循环打印字符*/ #include <stdio.h 阅读全文
posted @ 2020-10-17 21:20 赖梓贤 阅读(68) 评论(0) 推荐(0) 编辑