2021年1月1日
摘要: 实验三 正确输出了,产生了,是正确且直观可读的 实验四 正确输出了,产生了,不直观可读 #include<stdio.h> #include <stdlib.h> #define N 10 typedef struct student{ int num; char name[20]; int sco 阅读全文
posted @ 2021-01-01 12:27 魏梦如 阅读(46) 评论(1) 推荐(0) 编辑
  2020年12月21日
摘要: #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 2 typedef struct student { int id; char name[20]; char subject[20]; float perf; floa 阅读全文
posted @ 2020-12-21 20:07 魏梦如 阅读(80) 评论(1) 推荐(0) 编辑
  2020年12月17日
摘要: 1.实验一 #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],a[ 阅读全文
posted @ 2020-12-17 20:35 魏梦如 阅读(82) 评论(0) 推荐(0) 编辑
  2020年11月29日
摘要: 实验1 一元二次方程的根不可以设计成函数的返回值返回给主调函数,因为一元二次方程的根可能有两个不同的,而函数的返回值只能是一个。 实验2 #include<stdio.h> long long fac(int n); int main(){ int i,n; printf("Enter n: "); 阅读全文
posted @ 2020-11-29 20:27 魏梦如 阅读(118) 评论(0) 推荐(0) 编辑
  2020年11月18日
摘要: 实验1: #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-18 20:24 魏梦如 阅读(129) 评论(0) 推荐(0) 编辑
  2020年11月3日
摘要: 1.实验任务1 //ex1.cpp #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); return 0; } d=5/ 阅读全文
posted @ 2020-11-03 16:20 魏梦如 阅读(137) 评论(0) 推荐(0) 编辑
  2020年10月18日
摘要: /*A simple C program*/ #include<stdio.h> int main(){ printf("my stuon is:202083450105\n"); printf("hello,2020:)\n"); return 0; } /*循环打印字符*/ #include<s 阅读全文
posted @ 2020-10-18 16:26 魏梦如 阅读(89) 评论(0) 推荐(0) 编辑