2020年12月30日
摘要: 实验任务3 基于运行观察,回答实验任务3中的问题: 运行程序,观察在屏幕上是否正确输出了按分数由高→低排序的信息? 是的。 同时,在当前路径下,是否生成了文本文件file3.dat? 是的。 尝试用记事本程序打开文件file3.dat,观察里面的数据信息是否是正确的,并且是直观可读的? 非常直观可读 阅读全文
posted @ 2020-12-30 20:38 黑卡卡卡蒂 阅读(66) 评论(1) 推荐(0) 编辑
  2020年12月23日
摘要: 实验任务1 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 #define N 3 5 6 typedef struct student { 7 int id; 8 char name[20]; 9 char subje 阅读全文
posted @ 2020-12-23 20:25 黑卡卡卡蒂 阅读(92) 评论(2) 推荐(0) 编辑
  2020年12月16日
摘要: 实验任务1 1 #include <stdio.h> 2 3 const int N=3; 4 int main() { 5 int a[N] = {1, 2, 3}; 6 int i; 7 8 printf("通过数组名及下标直接访问数组元素:\n"); 9 for(i=0; i<N; i++) 阅读全文
posted @ 2020-12-16 22:04 黑卡卡卡蒂 阅读(109) 评论(1) 推荐(0) 编辑
  2020年12月2日
摘要: 实验任务1 结论 不能,返回值有两个,不方便如此设计。 实验任务2 1 #include <stdio.h> 2 long long fac(int); 3 main() 4 { 5 int i,n; 6 printf("Enter n:"); 7 scanf("%d",&n); 8 for(i = 阅读全文
posted @ 2020-12-02 20:39 黑卡卡卡蒂 阅读(58) 评论(1) 推荐(0) 编辑
  2020年11月19日
摘要: 实验任务1 1 #include <math.h> 2 #include <stdio.h> 3 int main() 4 { 5 float a, b, c, x1, x2; 6 float delta, real, imag; 7 printf("Enter a, b, c: "); 8 whi 阅读全文
posted @ 2020-11-19 14:02 黑卡卡卡蒂 阅读(102) 评论(1) 推荐(0) 编辑
  2020年11月3日
摘要: 实验1 #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; } 阅读全文
posted @ 2020-11-03 21:50 黑卡卡卡蒂 阅读(159) 评论(2) 推荐(0) 编辑
  2020年10月16日
摘要: 实验任务1——helloC.cpp # include <stdio.h> int main() { printf("202083450025\n"); printf("2020,I'll be fine."); return 0; } 实验任务2——printChar.cpp #include < 阅读全文
posted @ 2020-10-16 21:09 黑卡卡卡蒂 阅读(80) 评论(1) 推荐(0) 编辑