摘要: #include <stdio.h> #include <string.h> #define N 5 #define M 80 int main() { char songs[N][M]; FILE* fp; fp = fopen("data4.txt", "r"); if (fp == NULL) 阅读全文
posted @ 2023-12-18 07:10 小黑酱 阅读(5) 评论(0) 推荐(0) 编辑
摘要: // P286例8.17 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 // 打印不及格学生信息和所有学生信息程分别调用 #include <stdio.h> #include <string.h> #define N 3 // 运行程序输入测试时,可以把这个数组改小一些输入 阅读全文
posted @ 2023-12-13 19:27 小黑酱 阅读(5) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #define N 5 void input(int x[], int n); void output(int x[], int n); void find_min_max(int x[], int 阅读全文
posted @ 2023-11-30 13:58 小黑酱 阅读(7) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <math.h> #include <stdio.h> #define N 4 void test1() { int a[N] = { 1, 9, 8, 4 }; int i; / 阅读全文
posted @ 2023-11-15 22:38 小黑酱 阅读(7) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> #include <time.h> #include <windows.h> #define N 80 void print_text(int line, int col, char text[]); // 函数声明 vo 阅读全文
posted @ 2023-10-30 15:17 小黑酱 阅读(7) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 #define N1 374 #define N2 465 int main() { int number; int i; srand( time(0) ); / 阅读全文
posted @ 2023-10-16 22:45 小黑酱 阅读(3) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #include<stdlib.h> #include<time.h> #include<iostream> using namespace std; int main() { /*task1-1*/ for (int i = 0; i <= 1; i++) { 阅读全文
posted @ 2023-09-28 15:40 小黑酱 阅读(13) 评论(0) 推荐(0) 编辑
摘要: from turtle import * def square(size=50,rgb='yellow'): pencolor(rgb) for i in range(4): fd(size) left(90) def main(): setup(800,600) speed(0) n=10 for 阅读全文
posted @ 2022-06-13 21:55 小黑酱 阅读(3) 评论(0) 推荐(0) 编辑
摘要: class User: def __init__(self,name='guest',password=111111,status=1): self.name=name self.password=password self.status=status def info(self): print(' 阅读全文
posted @ 2022-06-05 16:41 小黑酱 阅读(16) 评论(1) 推荐(0) 编辑
摘要: def is_valid(x): ls=[str(i) for i in range(0,10)] ls.append('X') if len(x)<18: return False for a in range(len(x)): if x[a] not in ls: return False br 阅读全文
posted @ 2022-05-22 20:51 小黑酱 阅读(12) 评论(2) 推荐(0) 编辑