摘要: 3. 既然老师都这么打了那么一定是达到了预期效果的 文件处理的优点就是生成了这么个文件,在处理复杂的数据的时候使他清晰可见的呈现出来(可以偷个懒) 4. 子任务1.自然是同上(不是) 居然不清晰可读,(电脑甚至提醒我不要用记事本 打开) 子任务2. 代码 1 #include<stdio.h> 2 阅读全文
posted @ 2020-12-28 16:37 togeplane 阅读(99) 评论(2) 推荐(0)
摘要: 1.由于代码和运算结果比较显然,这里不再搬运 此做法的优点即在各个常用函数确定的情况下,录入输出的信息会显得条理清晰。 2.代码 1 #include <stdio.h> 2 3 const int N=5; 4 5 // 定义结构体类型struct student,并定义STU为其别名 6 typ 阅读全文
posted @ 2020-12-20 19:57 togeplane 阅读(66) 评论(2) 推荐(0)
摘要: 1. 代码 1 #include <stdio.h> 2 const int N=3; 3 int main() { 4 int a[N] = {1, 2, 3}; 5 int i; 6 printf("通过数组名及下标直接访问数组元素:\n"); 7 for(i=0; i<N; i++) 8 pr 阅读全文
posted @ 2020-12-13 20:23 togeplane 阅读(77) 评论(2) 推荐(0)
摘要: 1.不能,因为单个函数无法返回两个变量。 2.略 static变量用的是上次结算的值 3.代码 1 #include <stdio.h> 2 3 #define N 1000 4 int fun(int n,int m,int bb[N]) { 5 int i,j,k=0,flag; 6 7 for 阅读全文
posted @ 2020-11-29 10:21 togeplane 阅读(92) 评论(2) 推荐(0)
摘要: 1.代码 1 #include<stdio.h> 2 #include<math.h> 3 int main(){ 4 5 float a, b, c, x1, x2; 6 float delta, real, imag; 7 printf("Enter a, b, c: "); 8 while(s 阅读全文
posted @ 2020-11-14 09:59 togeplane 阅读(81) 评论(2) 推荐(0)
摘要: 1.代码 1 #include <stdio.h> 2 int main(){ 3 int a=5,b=7,c=100,d,e,f; 4 5 d=a/b*c; 6 e=a*c/b; 7 f=c/b*a; 8 printf("d=%d,e=%d,f=%d\n",d,e,f); 9 10 return 阅读全文
posted @ 2020-10-31 21:43 togeplane 阅读(75) 评论(3) 推荐(0)
摘要: 1 /*2020*/ 2 #include<stdio.h> 3 int main() { 4 5 printf("my stuno is:202083290298\n"); 6 printf("2020 nidaye"); 7 8 return 0; 9 10 } 测试结果 2.循环 (1)whi 阅读全文
posted @ 2020-10-15 20:36 togeplane 阅读(89) 评论(1) 推荐(0)