学习c++以来,写的最长的一个程序,请评价?

来源:百度知道 编辑:UC知道 时间:2024/05/23 10:38:53
//=======================================================
//输出平均数,众数,中数。
//作者:凝宇 2009年10月19日
//=======================================================
//-------------------------------------------------------
#include<iostream.h>
#include<stdlib.h>
#include<iomanip.h>
#include<time.h>
//--------------------------------------------------------
void printarray(const int response[],int responsesize) //输出数组元素的值
{
for(int n=0;n<responsesize;n++)
cout<<response[n]<<' ';
cout<<endl;
}
void bubblesort(int response[],int responsesize) //冒泡排序
{
int temp;
for(int n=0;n<responsesize-1;n++)
for(int m=n+1;m<responsesize;m++)
{
if(response[n]>response[m])
{
temp=response[n];
response[n]=response[m];
response[m]=temp;

}
}
}

void mean(const

学习c++才一个星期就这样的功底了,确实不错。c++呢它其实不仅仅是类c的编码,学习下去你就会发现。(ps:上面的排序不叫冒泡,而是选择排序,冒泡呢就像泡沫一样将最大值或者最小值挤到最外的边沿)

平均数用(double)total/responsesize比较精确
没有用面向对象的思想

确实挺长

哇,那你是天才哦。。呵呵。。好厉害。。一个星期就能写出这么个东西来了