摘要: Part 1: 1: // 从文本文件file1.dat中读取数据,找出最高分和最低分学生信息,并输出在屏幕上 #include <stdio.h> #include <stdlib.h> #define N 10 // 定义一个结构体类型STU typedef struct student { i 阅读全文
posted @ 2019-12-31 08:52 PuppyPiggy 阅读(92) 评论(1) 推荐(0)
摘要: Part 1 #include <stdio.h>#include <stdlib.h> const int N=5; // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; int s 阅读全文
posted @ 2019-12-21 19:08 PuppyPiggy 阅读(146) 评论(1) 推荐(0)
摘要: Part 1 1-1 1、数组元素在内存中是连续存放的 2、a+i和&a[i]等价,都表示地址; *(a+i)和a[i]等价,都表示元素 1-2 1、二维数组元素在内存中是按列存放 2、a[i]+j和&a[i][j]等价,都表示地址;*(a[i]+j)和a[i][j]等价,都表示元素 3、在二维数组 阅读全文
posted @ 2019-12-16 23:56 PuppyPiggy 阅读(130) 评论(4) 推荐(0)
摘要: Part1 1. #include <math.h> #include <stdio.h> #include <stdlib.h> void solve(double a, double b, double c); int main() { double a, b, c; printf("Enter 阅读全文
posted @ 2019-11-29 22:51 PuppyPiggy 阅读(112) 评论(4) 推荐(0)
摘要: Part1: #include <math.h> #include <stdio.h> #include <stdlib.h> int main() { float a, b, c, x1, x2; float delta, real, imag; printf("Enter a, b, c: ") 阅读全文
posted @ 2019-11-15 17:38 PuppyPiggy 阅读(154) 评论(4) 推荐(0)
摘要: 123.456001与初始值不一致,123.5与初始值不一致,123.46与初始值不一致,1.23e+002与初始值不一致,原因:计算机中采用二进制,输入数只能四舍五入的转化为二进制存储,当取出时就不能还原原本的十进制123.456,这样就出现了浮点数的精确度问题 Hello,world!后三个与初 阅读全文
posted @ 2019-11-03 11:03 PuppyPiggy 阅读(126) 评论(6) 推荐(0)
摘要: #include<stdio.h> int main() { printf("201983270553"); return 0; } #include<stdio.h> int product(int,int); int main(void) { int x,y,s; scanf("%d%d",&x,&y); s=product(x,y); printf("The mul is:%d",s); r 阅读全文
posted @ 2019-10-18 23:47 PuppyPiggy 阅读(117) 评论(0) 推荐(0)