摘要: 实验任务4 #include<stdio.h> #define M 80 int main() { char ch; FILE *fp; fp=fopen("d:/data4.txt","r"); if(fp==NULL) { printf("fail to open file\n"); retur 阅读全文
posted @ 2023-06-08 14:37 202183360008仲苏洋 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 实验任务4 #include<stdio.h> #include<string.h> #define N 100 typedef struct { char num[10]; int s1; int s2; double sum; char level[10]; }STU; int fun(STU 阅读全文
posted @ 2023-05-25 15:00 202183360008仲苏洋 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 #include<stdio.h> #define N 4 int main() { int x[N]={1,9,8,4}; int i; int *p; for(i=0;i<N;++i) printf("%d",x[i]); printf("\n"); for(p=x;p<x+N;++ 阅读全文
posted @ 2023-05-06 07:44 202183360008仲苏洋 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 #include<stdio.h> #define N 4 int main() { int a[N]={2,0,2,3}; char b[N]={'2','0','2','3'}; int i; printf("sizeof(int)=%d\n",sizeof(int)); print 阅读全文
posted @ 2023-04-15 08:58 202183360008仲苏洋 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 #include<stdio.h> #include<stdlib.h> #include<time.h> #include<windows.h> #define N 80 void print_text(int line,int col,char text[]); void print 阅读全文
posted @ 2023-03-31 11:21 202183360008仲苏洋 阅读(13) 评论(1) 推荐(0) 编辑
摘要: 实验任务1 #include<stdio.h> #include<stdlib.h> #include<time.h> #define N 5 #define R1 586 #define R2 701 int main() { int number; int i; srand(time(0)); 阅读全文
posted @ 2023-03-17 17:00 202183360008仲苏洋 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 //打印一个字符小人 #include<stdio.h> int main() { printf(" O \n"); printf("<H>\n"); printf("I I\n"); return 0; } //打印一个字符小人 #include<stdio.h> int main() 阅读全文
posted @ 2023-03-03 13:06 202183360008仲苏洋 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 实验任务3 from turtle import* def square(size=50,rgb='pink'): pencolor(rgb) for i in range(4): fd(size) left(90) def main(): setup(800,600) speed(0) n=10 阅读全文
posted @ 2022-06-12 10:50 202183360008仲苏洋 阅读(33) 评论(1) 推荐(0) 编辑
摘要: 实验任务5 count=0 def __init__(self,name='gest',password=111111,status=1): User.count+=1 self.name=name self.password=password self.status=status def info 阅读全文
posted @ 2022-06-05 16:10 202183360008仲苏洋 阅读(24) 评论(1) 推荐(0) 编辑
摘要: 实验任务3 def is_valid(s): if(len(s)!=18): return False for i in range(len(s)): if((s[i]<'0' or s[i]>'9') and s[i]!='X'): return False else: return True l 阅读全文
posted @ 2022-05-22 08:27 202183360008仲苏洋 阅读(13) 评论(1) 推荐(0) 编辑