摘要: 四、实验结论 1. 实验任务1 task1_1 1 #include <stdio.h> 2 #define N 4 3 4 int main() 5 { 6 int x[N] = {1, 9, 8, 4}; 7 int i; 8 int *p; 9 10 // 方式1:通过数组名和下标遍历输出数组 阅读全文
posted @ 2022-06-07 16:16 liuxianer 阅读(39) 评论(0) 推荐(0)
摘要: 四、实验结论 1. 实验任务1 task1_1 1 //将图书信息写入文本文件data1.txt 2 3 #include <stdio.h> 4 #define N 5 5 #define M 80 6 7 typedef struct 8 { 9 char name[M]; // 书名 10 c 阅读全文
posted @ 2022-05-31 16:04 liuxianer 阅读(46) 评论(0) 推荐(0)
摘要: 四、实验结论 1. 实验任务1 task1_1 1 #include <stdio.h> 2 #define N 4 3 4 int main() 5 { 6 int a[N] = {2, 0, 2, 2}; 7 char b[N] = {'2', '0', '2', '2'}; 8 int i; 阅读全文
posted @ 2022-05-04 09:24 liuxianer 阅读(32) 评论(0) 推荐(0)
摘要: 四、实验结论 1. 实验任务1 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 #include <windows.h> 5 #define N 80 6 7 void printText(int line,int c 阅读全文
posted @ 2022-04-21 11:12 liuxianer 阅读(35) 评论(0) 推荐(0)
摘要: 四、实验结论 1. 实验任务1 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 #define N 5 5 int main() 6 { 7 int grade, number; 8 int i; 9 10 srand 阅读全文
posted @ 2022-04-13 19:27 liuxianer 阅读(83) 评论(0) 推荐(0)
摘要: 四、实验结论 1. 实验任务1 //在垂直方向上打印两个字符小人 #include<stdio.h> int main() { printf(" o\n"); printf(" <H>\n"); printf(" I I\n"); printf(" o\n"); printf(" <H>\n"); 阅读全文
posted @ 2022-03-23 20:26 liuxianer 阅读(131) 评论(1) 推荐(0)