摘要: 实验七——实验终章 本次实验是用室友的电脑打的,第一次尝试使用一个新的编译器进行实验,刚开始很不适应但是一点点摸索下最后还是找到了使用技巧。(我没太弄明白为什么这个编译器在输出结果的时候会出现乱码的状况,不过在输出到记事本文件中的答案是正确的) ps:为什么要用舍友电脑打?因为偷懒.....觉得Ma 阅读全文
posted @ 2020-12-30 18:40 WesleyMoob& 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 实验六 实验任务一 #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 3 // ‘À––≥Öڠ‰»Î≤‚ ‘ ±£¨ø…“‘∞—N∏ƒ–°“ª–© ‰»Î≤‚ ‘ typedef struct student { 阅读全文
posted @ 2020-12-22 16:20 WesleyMoob& 阅读(45) 评论(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( 阅读全文
posted @ 2020-12-17 20:53 WesleyMoob& 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 实验四 实验任务一、 // 一元二次方程求解(函数实现方式) // 重复执行, 直到按下Ctrl+Z结束 #include <math.h> #include <stdio.h> // 函数声明 void solve(double a, double b, double c); // 主函数 int 阅读全文
posted @ 2020-11-25 20:04 WesleyMoob& 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 一·#include<stdio.h> #include<math.h> int main() { float a, b, c, x1, x2; float delta, real, imag; printf("Enter a, b, c: "); while(scanf("%f%f%f", &a, 阅读全文
posted @ 2020-11-16 22:05 WesleyMoob& 阅读(47) 评论(0) 推荐(0) 编辑
摘要: 实验2(实验结果及实验报告)实验任务一: 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); 阅读全文
posted @ 2020-10-28 09:50 WesleyMoob& 阅读(145) 评论(1) 推荐(0) 编辑
摘要: #include <stdio.h> int main(int argc, const char * argv[]) #include <stdio.h> int main() { int x,y; int r1,r2,r3,r4; x=1; y=2; r1=x+y; r2=y-x; r3=y/x; 阅读全文
posted @ 2020-10-16 21:27 WesleyMoob& 阅读(94) 评论(1) 推荐(0) 编辑