文件名称:9-2
介绍说明--下载内容来自于网络,使用问题请自行百度
9-2 建立一个一维数组a,并完成以下任务,并输入输出格式参见下图。
(1)以自动生成的斐波那契数列前10项(前两项为1、1)为数组元素赋初值,并输出;
(2)将键盘输入的一个数据插入,并数组元素值仍保持有序;
(3)把数组中相同的数据删除到只剩下一个,并输出;
(4)求出数组所有元素的平均值,并输出;
(5)删除数组中所有低于平均值的那些元素。(9-2 create a one-dimensional array a, and complete the following tasks, and the input and output formats are shown in the figure below.
(1) the first 10 items (the first two items are 1 and 1) of the Fibonacci sequence generated automatically are used as the initial values of array elements and output;
(2) insert a data input by the keyboard, and keep the array element values in order;
(3) delete the same data in the array to only one and output;
(4) average all elements of the array and output;)
(1)以自动生成的斐波那契数列前10项(前两项为1、1)为数组元素赋初值,并输出;
(2)将键盘输入的一个数据插入,并数组元素值仍保持有序;
(3)把数组中相同的数据删除到只剩下一个,并输出;
(4)求出数组所有元素的平均值,并输出;
(5)删除数组中所有低于平均值的那些元素。(9-2 create a one-dimensional array a, and complete the following tasks, and the input and output formats are shown in the figure below.
(1) the first 10 items (the first two items are 1 and 1) of the Fibonacci sequence generated automatically are used as the initial values of array elements and output;
(2) insert a data input by the keyboard, and keep the array element values in order;
(3) delete the same data in the array to only one and output;
(4) average all elements of the array and output;)
相关搜索: visual c++
(系统自动生成,下载前可以参看下载内容)
下载文件列表
文件名 | 大小 | 更新时间 |
---|---|---|
9-1.cpp | 822 | 2019-12-06 |
9-1.zip | 624 | 2019-12-06 |
9-2.cpp | 1014 | 2019-12-06 |
实验报告九.vcxproj | 3924 | 2019-11-28 |
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.