摘要: 实验4 程序源码 1 #define _CRT_SECURE_NO_WARNINGS 1 2 #include <stdio.h> 3 4 int main() { 5 FILE* fp; 6 fp = fopen("data4.txt", "r"); 7 if (fp == NULL) { 8 p 阅读全文
posted @ 2022-12-24 17:23 ABCDEFGOGOGO 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 实验任务三 程序源码 1 #define _CRT_SECURE_NO_WARNINGS 1 2 #include <stdio.h> 3 #include<string.h> 4 #include<stdlib.h> 5 #define N 100 6 typedef struct { 7 cha 阅读全文
posted @ 2022-12-21 09:25 ABCDEFGOGOGO 阅读(16) 评论(0) 推荐(0) 编辑
摘要: task3 程序源码 task3_1.cpp 1 #define _CRT_SECURE_NO_WARNINGS 1 2 #include <iostream> 3 #include <fstream> 4 #include <array> 5 #define N 5 6 using namespa 阅读全文
posted @ 2022-12-03 15:16 ABCDEFGOGOGO 阅读(21) 评论(0) 推荐(0) 编辑
摘要: task1_1 程序源码 task1_1.cpp 1 #include <iostream> 2 #include <map> 3 using namespace std; 4 int main() { 5 map<int, char> grade_dict{ {1, 'A'}, {2, 'B'}, 阅读全文
posted @ 2022-11-26 12:02 ABCDEFGOGOGO 阅读(27) 评论(0) 推荐(0) 编辑
摘要: task1_1 程序源码 1 #define _CRT_SECURE_NO_WARNINGS 1 2 #include <stdio.h> 3 #define N 4 4 int main() { 5 int a[N] = { 1,2,3,4 }; 6 char b[N] = { 'a', 'b', 阅读全文
posted @ 2022-11-24 21:13 ABCDEFGOGOGO 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 实验任务一: point.hpp 1 #pragma once 2 #include <iostream> 3 using namespace std; 4 class Point { 5 public: 6 Point() : x{ 0 }, y{ 0 } {} 7 Point(int x0, i 阅读全文
posted @ 2022-11-06 21:45 ABCDEFGOGOGO 阅读(27) 评论(1) 推荐(0) 编辑
摘要: 实验任务一: task1.c 1 #include <stdio.h> 2 #include <time.h> 3 #include <windows.h> 4 #include <stdlib.h> 5 #define N 30 6 void print_spaces(int); 7 void p 阅读全文
posted @ 2022-11-02 13:04 ABCDEFGOGOGO 阅读(46) 评论(1) 推荐(0) 编辑
摘要: 实验任务5: info.hpp文件源码 1 #pragma once 2 #include <string> 3 #include <iostream> 4 #include <iomanip> 5 using namespace std; 6 class info { 7 public: 8 in 阅读全文
posted @ 2022-10-25 13:11 ABCDEFGOGOGO 阅读(22) 评论(1) 推荐(0) 编辑
摘要: task1.c 源代码: 1 #include <stdio.h> 2 #include <time.h> 3 #include <stdlib.h> 4 #define N 5 5 int main() { 6 int number; 7 int i; 8 9 srand(time(0)); 10 阅读全文
posted @ 2022-10-20 09:43 ABCDEFGOGOGO 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 实验任务4: 程序源码: complex.hpp 1 #pragma once 2 #include <iostream> 3 #include <cmath> 4 using namespace std; 5 class Complex { 6 public: 7 Complex(double r 阅读全文
posted @ 2022-10-16 12:40 ABCDEFGOGOGO 阅读(13) 评论(2) 推荐(0) 编辑