- 博客(4)
- 收藏
- 关注
原创 C语言期中实验报告
用CreateRandData()、Sort()、InsertValue()三个函数实现以下功能: A. 生成10个三位随机正整数放在a数组中; B. 对数组中的元素进行升序排序,排序方法可任选(选择排序、冒泡排序、插入排序); C. 任意输入一个整数,并插入到数组中,使之任保持有序; #include <stdio.h> #include <stdlib.h> #include <time.h> int main() { void InsertValue(int ar
2020-05-26 20:48:12
2835
6
原创 期中实验
期中实验二从键盘上输入若干个学生的成绩,统计并输出最高成绩和最低成绩,当输入负数时结束输入。(用while循环语句实现)输入一个数,求出该数的各位数字的立方和,如输入123,则输出36。计算 s=1!+2!+……+20! 的值并输出。 从键盘上输入若干个学生的成绩,统计并输出最高成绩和最低成绩,当输入负数时结束输入。(用while循环语句实现) 下面展示代码。 #include<stdio.h> void main() { int score,max=0,min=100;//这样赋值更好更新m
2020-05-26 17:08:26
345
原创 期中实验
读入3个分别表示箱子长、宽、高的整数值,判断并输出该箱子是立方体还是长方体 比较简单,直接上代码 #include<stdio.h> void main() { int length,width,height; printf("Please enter the length, width and height of the box\n"); scanf("%d %d %d",&length,&width,&height); if(length==width&
2020-05-26 10:52:48
2028
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅