摘要: 实验1 实验2 修改后仍能满足题目要求 实验3 是直观可读 实验4 子任务1 是 是 不直观可读 子任务2 #include<stdio.h> #include<stdlib.h> #define N 10 typedef struct student { int num; char name[20 阅读全文
posted @ 2020-12-29 12:50 Hhh# 阅读(30) 评论(1) 推荐(0)
摘要: // P280例8.15 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 // 打印不及格学生信息和所有学生信息程分别调用 #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 3 // 运行程序输入 阅读全文
posted @ 2020-12-21 21:24 Hhh# 阅读(47) 评论(0) 推荐(0)
摘要: #include <stdio.h> const int N=3; int main() { int a[N] = {1, 2, 3}; int i; printf("通过数组名及下标直接访问数组元素:\n"); for(i=0; i<N; i++) printf("%d: %d\n", &a[i] 阅读全文
posted @ 2020-12-13 23:04 Hhh# 阅读(85) 评论(2) 推荐(0)
摘要: // 一元二次方程求解 (函数实现方式) // 重复执行, 直到按Ctrl+Z结束 #include <math.h>//理解1:在主函数中调用,在调用前声明,不需要返回值,故设置为void,一元二次方程的系数作为参数,能。 #include <stdio.h>// 理解2:x1,x2,delta, 阅读全文
posted @ 2020-11-29 15:51 Hhh# 阅读(48) 评论(2) 推荐(0)
摘要: #include <stdio.h> #include <math.h> int main(){ float a, b, c, x1, x2; float delta, real, imag; printf("Enter a, b, c: "); while(scanf("%f%f%f", &a, 阅读全文
posted @ 2020-11-12 23:46 Hhh# 阅读(201) 评论(2) 推荐(0)
摘要: #include <stdio.h> int main() { int a=5, b=7, 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; } // ex2. 阅读全文
posted @ 2020-10-29 20:12 Hhh# 阅读(148) 评论(2) 推荐(0)
摘要: #include<stdio.h> int main() { printf("202083290288\n"); printf("你的中单我打穿"); return 0 ; } #include<stdio.h> int main() { while(1) printf("你好,明天"); retu 阅读全文
posted @ 2020-10-15 16:21 Hhh# 阅读(113) 评论(3) 推荐(1)
摘要: #include<stdio.h>int main(){ printf("202083290288\n"); printf("2020,教你做人"); return 0 ;} 阅读全文
posted @ 2020-10-15 14:46 Hhh# 阅读(56) 评论(0) 推荐(0)
摘要: #include<stdio.h> int main() { int num1=0; int num2=0; int sum=0; scanf("%d%d",&num1,&num2); sum=num1+num2; printf("sum=%d\n",sum); return 0; } 阅读全文
posted @ 2020-10-13 18:47 Hhh# 阅读(65) 评论(0) 推荐(0)