摘要: 1.正确输出;生成了;可读#include <stdlib.h> #define N 10 typedef struct student { int num; char name[20]; int score; }STU; int main() { FILE* fp; STU st[N]; int 阅读全文
posted @ 2020-12-31 23:48 sfasafasf 阅读(29) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> const int N = 5; typedef struct student { long no; char name[20]; int score; }STU; void input(STU s[], int n); int findminlist(STU 阅读全文
posted @ 2020-12-24 21:40 sfasafasf 阅读(33) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> const int N=3; int main() { int a[N] = {1, 2, 3}; int i; printf("通过数组名及下表直接访问数组元素:\n"); for(i=0; i<N; i++) printf("%d: %d\n", &a[i] 阅读全文
posted @ 2020-12-17 11:11 sfasafasf 阅读(32) 评论(0) 推荐(0) 编辑
摘要: int main() { int n, symbol; while (scanf_s("%d %c", &n, &symbol) != EOF) { draw(n, symbol); // 函数调用 printf("\n"); } return 0; } void draw(int n, char 阅读全文
posted @ 2020-12-03 23:26 sfasafasf 阅读(27) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #include<stdlib.h> #include<time.h> int main() { int n = 1, x, b; srand(time(0)); b = rand() % 31 + 1; printf("猜猜2020哪一天是你的luck day\ 阅读全文
posted @ 2020-11-14 22:24 sfasafasf 阅读(34) 评论(0) 推荐(0) 编辑
摘要: #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); r 阅读全文
posted @ 2020-10-31 13:16 sfasafasf 阅读(55) 评论(0) 推荐(0) 编辑