12 2020 档案

摘要:任务一 #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 4 // 运行程序输入测试时,可以把N改小一些输入测试 typedef struct student { int id; /*学生学号 */ char name 阅读全文
posted @ 2020-12-23 22:56 裴宇霏 阅读(79) 评论(2) 推荐(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", & 阅读全文
posted @ 2020-12-17 22:11 裴宇霏 阅读(62) 评论(1) 推荐(0)
摘要:任务一 每个函数只有一个返回值,一元二次方程的根有两个,故不能设计成返回值。 任务二 #include <stdio.h> long long fac(int n); int main() { int i,n; printf("Enter n: "); scanf("%d", &n); for(i= 阅读全文
posted @ 2020-12-05 22:04 裴宇霏 阅读(86) 评论(2) 推荐(0)