全國最多中醫師線上諮詢網站-台灣中醫網
上鎖的主題 上鎖的主題 瀏覽次數:12388
推到 Plurk!
推到 Facebook!

請各位高手幫忙解題>"<急!拜託了! <-- 錯誤發問方式範例

 
max90209
一般會員


發表:1
回覆:6
積分:1
註冊:2006-12-25

發送簡訊給我
#1 發表時間:2006-12-25 01:41:11 IP:203.64.xxx.xxx 訂閱
依所冷統計程式(函式庫),請建立你自己的統甫計算軟體系統。你所建立之系統需至少能夠符合以下各要求。
a)輸入方式:使用者可由銀幕詢問狀況下輸入資料,或由使用考選擇由檔案輸入資料。(兩樣階需俱備)
b)統計函式:至少需包含(1)mean(平均數),(2)median(中位數),(3)mode(眾數),(4)全距(range),(5)標準差(standard deviation)『注意:標準差有樣本及母體之差異』
c)輸出方式:使用者可選擇將計算結果輸出至銀幕或輸出至檔案。(兩樣階需俱備)
測試資料如下:
畢業學生編號 月薪
1 2850
2 2950
3 3050
4 2880
5 2755
6 2710
7 2890
8 3130
9 2940
10 3325
11 2920
12 2880
附上程式庫:
/* statlib.c (60 functions 5 Apr 06) */
#include
#include
#include <math.h><br />#include
#include "statlib.h"
/* t-test table lookup for df=[1,30] p=.05 */
double t_table05[] = {
0.0,6.313,2.919,2.353,2.131,2.015,
1.943,1.894,1.859,1.833,1.812,1.795,
1.782,1.770,1.761,1.753,1.745,1.739,
1.734,1.729,1.724,1.720,1.717,1.713,
1.710,1.708,1.705,1.703,1.701,1.699,
1.697};
/* t-test table lookup for df=[1,30] p=.01 */
double t_table01[] = {
0.0,31.820,6.964,4.540,3.746,3.364,
3.142,2.997,2.896,2.821,2.763,2.718,
2.681,2.650,2.624,2.602,2.583,2.566,
2.552,2.539,2.527,2.517,2.508,2.499,
2.492,2.485,2.478,2.472,2.467,2.462,
2.457};
/* Anderson-Darling critical values for the normal distribution:
significance level critical value
------------------ --------------
.10 .656
.05 .787
.025 .918
.001 1.092
If the A-D statistic is greater than the critical value, the
conclusion at that level is that the data are not normally
distributed. The A-D statistic for the normal distribution
is returned by the library function anderson_darling_norm().
*/

/* * * * * * * * statistics interface * * * * * * * * * * * */
/* NOTE: Input error checking is minimal.
Take care to provide appropriate input. */
/* descriptive statistics for a single set of data ---------- */
/* Return the sum of values in datalist. (output OK) */
double sum(double *datalist, int listsize)
{
int idx;
double sum;
sum = 0.0;
for(idx = 0; idx < listsize; idx)
{
sum = datalist[idx];
}
return sum;
}
/* Return a pointer to an array containing
the min and max values in datalist. (output OK) */
double* min_max(double *datalist, int listsize)
{
int idx;
double min, max;
double *minmax = malloc(2 * sizeof(*minmax));
if(minmax == NULL)
{
fprintf(stderr, "malloc failed in min_max()\n");
exit(EXIT_FAILURE);
}
max = DBL_MIN;
min = DBL_MAX;
for(idx = 0; idx < listsize; idx)
{
if(datalist[idx] > max) max = datalist[idx];
if(datalist[idx] < min) min = datalist[idx];
}
minmax[0] = min;
minmax[1] = max;
return minmax;
}
/* Return the range of values in datalist. (output OK) */
double range(double *datalist, int listsize)
{
int idx;
double min, max;
max = DBL_MIN;
min = DBL_MAX;
for(idx = 0; idx < listsize; idx)
{
if(datalist[idx] > max) max = datalist[idx];
if(datalist[idx] < min) min = datalist[idx];
}
return fabs(max - min);
}
/* Return the arithmetic mean
of values in datalist. (output OK) */
double a_mean(double *datalist, int listsize)
{
int idx;
double sum;
sum = 0;
for(idx = 0; idx < listsize; idx)
{
sum = datalist[idx];
}
return sum / listsize;
}
/* Return the geometric mean of values in datalist.
A log transformation is used here to avoid overflow
of a large product. (output OK) */
double g_mean(double *datalist, int listsize)
{
int idx;
double p;
p = 0.0;
for(idx = 0; idx < listsize; idx )
{
if(datalist[idx] <= 0.0)
{
fprintf(stderr,
"error: zero or negative input to g_mean()\n");
exit(EXIT_FAILURE);
}
p = log(datalist[idx]);
}
return exp(p / (double)listsize);
}
/* Return the harmonic mean of values in datalist.
(output OK) */
double h_mean(double *datalist, int listsize)
{
int idx;
double r;
r = 0.0;
for(idx = 0; idx < listsize; idx )
{
r = 1.0 / datalist[idx];
}
return listsize / r;
}
/* Return Tukey's trimean. (output OK) */
double tukeys_trimean(double *datalist, int listsize)
{
double Q1, Q2, Q3;
Q1 = percentile(datalist, listsize, 25.0);
Q2 = percentile(datalist, listsize, 50.0);
Q3 = percentile(datalist, listsize, 75.0);
return (Q1 (2.0 * Q2) Q3) / 4.0;
}
/* Return a trimmed mean. A percentage P of the data
are trimmed from each end of the sorted list and
/* Return a trimmed mean. A percentage P of the data
are trimmed from each end of the sorted list and
the remaining data are averaged. Let p=(P/100)*listsize.
If p is a whole number, then p data are trimmed from each
end of the list and the remaining data are averaged.
If p is a fractional number, then the integer part of p
data are trimmed from each end of the list and the fractional
part of the highest and lowest of the remaining data are
taken and averaged with the rest of the remaining data.
*/
double trimmed_mean(double *datalist, int listsize, double P)
{
int idx, lo, hi;
double p, frac, sum;
if(P < 0.0 || P > 50.0)
{
fprintf(stderr, "error: invalid input to trimmed_mean()\n");
exit(EXIT_FAILURE);
}
sum = 0.0;
p = (P / 100.0) * listsize;
frac = p - (int)p;
lo = (int)p;
hi = listsize - lo;
qsort(datalist, listsize, sizeof(*datalist), compare);
if(frac == 0.0)
for(idx = lo; idx < hi; idx )
{
sum = datalist[idx];
}
else
for(idx = lo; idx < hi; idx )
{
if(idx==lo || idx==hi-1)
{
sum = datalist[idx] * frac;
}
else
{
sum = datalist[idx];
}
}

return sum / (hi - lo);
}
/* Return the arithmetic-geometric mean
of 2 numbers (output OK) */
double agm(double a, double b)
{
while(a != b)
{
a = .5 * (a b);
b = sqrt(a * b);
}
return a;
}
/* Return the midrange of values in datalist. (output OK) */
double midrange(double *datalist, int listsize)
{
int idx;
double largest, smallest;
largest = DBL_MIN;
smallest = DBL_MAX;
for(idx = 0; idx < listsize; idx)
{
if(datalist[idx] > largest) largest = datalist[idx];
if(datalist[idx] < smallest) smallest = datalist[idx];
}
return (smallest largest) / 2;
}
/* Return the median of values in datalist. (output OK) */
double median(double *datalist, int listsize)
{
qsort(datalist, listsize, sizeof(*datalist), compare);
if(listsize%2==0) /* if even, return avg of 2 middle elements */
return ((datalist[(listsize/2)-1]) (datalist[listsize/2]))/2;
else /* odd, return middle element */
return datalist[listsize/2];
else /* odd, return middle element */
return datalist[listsize/2];
}
/* Return the mode of values in datalist. */
/* If each value is unique, return zero. (output OK) */
double mode(double *datalist, int listsize)
{
int idx, jdx, mode;
int *tally;
tally = calloc(listsize, sizeof(*tally));
if(tally == NULL)
{
fprintf(stderr, "error: calloc failed in mode()\n");
exit(EXIT_FAILURE);
}
mode = -1;
for(idx = 0; idx < listsize; idx)
for(jdx = 0; jdx < listsize; jdx)
{
if(datalist[jdx] == datalist[idx])
tally[idx] ;
}
for(idx = 0; idx < listsize; idx)
{
if(tally[idx] > 1 && tally[idx] > mode)
mode = idx;
}
free(tally);
if(mode == -1)
return 0;
else
return datalist[mode];
}
/* Return the sample variance
of the values in datalist
_
SUM{(Xi - X)^2}
svar = ---------------
N-1
*/
double svar(double *datalist, int listsize)
{
int idx;
double mean, diff, sumsqrs;
sumsqrs = 0.0;
mean = a_mean(datalist, listsize);
for(idx = 0; idx < listsize; idx )
{
diff = datalist[idx] - mean;
sumsqrs = (diff * diff);
}
return sumsqrs / ((double)listsize-1.0);
}
/* Return the population variance
of the values in datalist
_
SUM{(Xi - X)^2}
pvar = ---------------
N
*/
double pvar(double *datalist, int listsize)
{
int idx;
double mean, diff, sumsqrs;
sumsqrs = 0.0;
mean = a_mean(datalist, listsize);
for(idx = 0; idx < listsize; idx )
{
diff = datalist[idx] - mean;
sumsqrs = (diff * diff);
}
return sumsqrs / (double)listsize;
}
/* Return the sample standard deviation
of values in datalist. (output OK) */
double s_stdev(double *datalist, int listsize)
{
return sqrt(svar(datalist, listsize));
}
/* Return the population standard deviation
of values in datalist. (output OK) */
double p_stdev(double *datalist, int listsize)
{
return sqrt(pvar(datalist, listsize));
}
/* Return the coefficient of variability
of the values in datalist. (output OK)
Some definitions of CoV do not multiply
the standard deviation times 100 */
double coeff_var(double *datalist, int listsize)
{
double sd, mean;
sd = s_stdev(datalist, listsize);
mean = a_mean(datalist, listsize);
return (100.0 * sd) / mean;
}
/* Return the mean deviation of
values in datalist. (output OK) */
double mean_dev(double *datalist, int listsize)
{
int idx;
double sum, mean;
sum = 0.0;
mean = a_mean(datalist, listsize);
for(idx = 0; idx < listsize; idx )
{
sum = fabs(datalist[idx] - mean);
}
return sum / (double)listsize;
}
/* Return the kth central moment of values in datalist.
(output OK)
*/
double central_moment(double *datalist, int listsize, double k)
{
int idx;
double sum, mean;
sum = 0.0;
mean = a_mean(datalist, listsize);
for (idx = 0; idx < listsize; idx )
{
sum = pow(datalist[idx] - mean, k);
}
return sum / (double)listsize;
}
/* Return the standard error of the mean
of values in datalist.
(output OK)
*/
double std_err_mean(double *datalist, int listsize)
{
return s_stdev(datalist, listsize) / sqrt((double)listsize);
}
/* Return the root mean square of values in datalist.
The root mean square is also called quadratic mean.
(output OK)
*/
double rms(double *datalist, int listsize)
{
int idx;
double sum_sqrs, mean;
sum_sqrs = 0.0;
for(idx = 0; idx < listsize; idx )
{
sum_sqrs = datalist[idx] * datalist[idx];
}
mean = sum_sqrs / listsize;
return sqrt(mean);
return sqrt(mean);
}
/* Return the kth percentile of values in datalist:
1. Let n be the length of the sorted array and
0 < ptile <= 100 be the desired percentile.
2. If n = 1 return the unique array element.
3. Compute the estimated percentile position
pos = p * (n 1) / 100 and the difference,
d between pos and floor(pos).
4. If pos >= n return the largest element in
the array.
5. Let lower be the element in position floor(pos)
in the array and let upper be the next element
in the array. Return lower d * (upper - lower).
(output OK)
*/
double percentile(double *datalist, int listsize, double ptile)
{
int n;
double p, pos, d, lower, upper;
p = ptile / 100.0;
n = listsize;
if(n < 1.0 / (1.0-p) || n < 1.0 / p)
{
fprintf(stderr, "\n\nerror: insufficient data to "
"compute %.2fth percentile\n", ptile);
return 0.0;
}
if(listsize == 1) return datalist[0];
qsort(datalist, listsize, sizeof(*datalist), compare);
pos = p * (n 1);
if(pos >= n) return datalist[n-1];
lower = floor(pos);
upper = lower 1.0;
d = pos - lower;
return datalist[(int)lower-1]
(d * (datalist[(int)upper-1] -
datalist[(int)lower-1]));
}
/* Return a pointer to an array holding the quartiles
of the values in datalist. (output OK) */
double* quartiles(double *datalist, int listsize)
{
double *qtiles;
qtiles = malloc(3 * sizeof(*qtiles));
if(qtiles == NULL)
{
fprintf(stderr, "malloc failed in quartiles()\n");
exit(EXIT_FAILURE);
}
qtiles[0] = percentile(datalist, listsize, 25.0);
qtiles[1] = percentile(datalist, listsize, 50.0);
qtiles[2] = percentile(datalist, listsize, 75.0);
return qtiles;
}
/* Return the interquartile range
of the values in datalist. (output OK) */
double interquartile_range(double *datalist, int listsize)
{
double a, b;
a = percentile(datalist, listsize, 25);
b = percentile(datalist, listsize, 75);
return b - a;
}
/* Return the skewness of values in datalist (output OK)
Implements the formula used by MS Excel
*/
double skewness1(double *datalist, int listsize)
{
int idx;
double n, mean, sd, t1, t2;
n = (double)listsize;
mean = a_mean(datalist, listsize);
n = (double)listsize;
mean = a_mean(datalist, listsize);
sd = s_stdev(datalist, listsize);
if(n < 3.0 || sd == 0.0)
{
fprintf(stderr, "error: invalid input to skewness()\n");
exit(EXIT_FAILURE);
}
t1 = n / ((n-1)*(n-2));
t2 = 0.0;
for(idx = 0; idx < listsize; idx )
{
t2 = pow((datalist[idx] - mean)/sd,3);
}
return t1 * t2;
}
/* Return the skewness of values in datalist (output OK)
Implements the formula used by NIST Dataplot and others.
*/
double skewness2(double *datalist, int listsize)
{
int idx;
double mean, sd, sum;
sum = 0.0;
mean = a_mean(datalist, listsize);
sd = s_stdev(datalist, listsize);
for(idx = 0; idx < listsize; idx )
{
sum = pow(datalist[idx] - mean, 3.0) / (listsize - 1);
}
return sum / pow(sd, 3.0);
}
/* Return the kurtosis of values in datalist. (output OK)
kurtosis1() implements the formula used by MINITAB and
MS Excel. It returns a result different from kurtosis2()
*/
double kurtosis1(double *datalist, int listsize)
{
int idx;
double n, mean, sd, t1, t2, t3;
n = (double)listsize;
mean = a_mean(datalist, listsize);
sd = s_stdev(datalist, listsize);
if(n < 4.0 || sd == 0.0)
{
fprintf(stderr, "error: invalid input to kurtosis()\n");
exit(EXIT_FAILURE);
}
t1 = (n*(n 1))/((n-1)*(n-2)*(n-3));
t2 = 0.0;
for(idx = 0; idx < listsize; idx )
{
t2 = pow((datalist[idx] - mean)/sd,4);
}
t3 = (3.0*((n-1)*(n-1)))/((n-2)*(n-3));
return (t1 * t2) - t3;
}
/* Return the kurtosis of values in datalist. (output OK)
kurtosis2() implements the formula used by Dataplot.
It returns a result different from kurtosis1()
*/
double kurtosis2(double *datalist, int listsize)
{
int idx;
double mean, sd, sum;
mean = a_mean(datalist, listsize);
sd = s_stdev(datalist, listsize);
sum = 0.0;
for(idx = 0; idx < listsize; idx )
{
sum = pow(datalist[idx] - mean, 4.0) / (listsize - 1);
}
return sum / pow(sd, 4.0);
}
/* statistics of paired data ------------------------------------ */
/* Return the Pierson product moment coefficient
/* Return the Pierson product moment coefficient
of correlation of a set of x,y data. (output OK) */
double corr_coeff(double *xlist, double *ylist, int xn, int yn)
{
int idx;
double r; /* Pierson's r */
double sumx; /* sum of x data */
double sumy; /* sum of y data */
double sumxy; /* sum of xi*yi */
double sumxsqr; /* sum of xi^2 */
double sumysqr; /* sum of yi^2 */
double n; /* number of xy pairs */
if(xn != yn)
{
fprintf(stderr,"error: data sets unequal\n");
fprintf(stderr,"in corr_coeff()\n");
exit(EXIT_FAILURE);
}
sumx = sumy = sumxy = sumxsqr = sumysqr = 0.0;
n = (double)xn;
for(idx = 0; idx < xn; idx )
{
sumx = xlist[idx];
sumy = ylist[idx];
sumxy = xlist[idx] * ylist[idx];
sumxsqr = xlist[idx] * xlist[idx];
sumysqr = ylist[idx] * ylist[idx];
}
r = (sumxy - (sumx * sumy) / n) / \
(sqrt((sumxsqr - (sumx * sumx) / n) \
* (sumysqr - (sumy * sumy) / n)));
return r;
}
/* Return the slope of the line of
best fit of a set of x,y data. (output OK) */
double slope_bf_line(double *xlist, double *ylist, int xn, int yn)
{
int idx;
double num, den, xmean, ymean;
if(xn != yn)
{
fprintf(stderr,"error: data sets unequal\n"
" in slope_bf_line()\n");
exit(EXIT_FAILURE);
}
xmean = a_mean(xlist, xn);
ymean = a_mean(ylist, yn);
num = 0.0;
den = 0.0;
for(idx = 0; idx < xn; idx )
{
num = (xlist[idx] - xmean) * (ylist[idx] - ymean);
den = (xlist[idx] - xmean) * (xlist[idx] - xmean);
}
return num / den;
}
/* Return the y-intercept of the line
of best fit of a set of x,y data. (output OK) */
double y_intercept(double *xlist, double *ylist, int xn, int yn)
{
double xmean, ymean, slope;
if(xn != yn)
{
fprintf(stderr,"error: data sets unequal\n"
" in y_intercept()\n");
exit(EXIT_FAILURE);
}
xmean = a_mean(xlist, xn);
ymean = a_mean(ylist, yn);
slope = slope_bf_line(xlist, ylist, xn, yn);
return ymean - (slope * xmean);
}
/* Return the standard deviation of the points
around the line of best fit. (not checked) */
double stdev_points(double *xlist, double *ylist, int xn, int yn)
{
int idx;
double xmean, ymean, slope;
double x, y, sumyy, sumxy;
sumyy = sumxy = 0.0;
xmean = a_mean(xlist, xn);
ymean = a_mean(ylist, yn);
slope = slope_bf_line(xlist, ylist, xn, yn);
for(idx = 0; idx < xn; idx )
{
x = xlist[idx] - xmean;
y = ylist[idx] - ymean;
sumyy = y * y;
sumxy = x * y;
}
return sqrt((sumyy - slope * sumxy) / (xn - 2.0));
}
/* Return the standard error of the
regression coefficient (slope).
(not checked)
*/
double stderr_reg_coeff(double *xlist, double *ylist, int xn, int yn)
{
int idx;
double spts, xmean, s;
if(xn != yn)
{
fprintf(stderr,"error: data sets unequal\n"
" in std_err_reg_coeff()\n");
exit(EXIT_FAILURE);
}
s = 0.0;
spts = stdev_points(xlist, ylist, xn, yn);
xmean = a_mean(xlist, xn);
for(idx = 0; idx < xn; idx )
{
s = (xlist[idx] - xmean) * (xlist[idx] - xmean);
}
s = sqrt(s);
return spts / s;
}
/* Return the covariance of 2 data sets. (output OK) */
double covariance(double *xlist, double *ylist, int xn, int yn)
{
int idx;
double sum, xmean, ymean;
if(xn != yn)
{
fprintf(stderr,"error: data sets unequal\n"
" in covariance()\n");
exit(EXIT_FAILURE);
}
sum = 0.0;
xmean = a_mean(xlist, xn);
ymean = a_mean(ylist, yn);
for(idx = 0; idx < xn; idx )
{
sum = (xlist[idx] - xmean) * (ylist[idx] - ymean);
}
return sum / (double)xn;
}
/* Return the Fisher transformation of x
where [-1 < x < 1] is the value
returned by corr_coeff(). (output OK) */
double fisher(double x)
{
if(x <= -1.0 || x >= 1.0)
{
fprintf(stderr, "error: invalid input to fisher()");
return 0.0;
}
return .5 * log((1.0 x) / (1.0 - x));
}
/* statistics involving probability ------------------------------ */
/* Return chi square of values in datalist. (output OK) */
double chi_square(double *datalist, int listsize)
{
int idx;
double term, numerator, avg, chisqr;
chisqr = 0.0;
avg = a_mean(datalist, listsize);
for(idx = 0; idx < listsize; idx)
{
term = datalist[idx] - avg;
numerator = term * term;
chisqr = numerator / avg;
}
return chisqr;
}
/* Return the probability of x successes in n events,
given the probability p for success in a single event,
using the formula for the binomial distribution:
n!
f(x) = --------- ( p^x )( (1-p)^(n-x) )
x! (n-x)!
p=0.0,...1.0 n=1,2,... x=0,1,...n
The calculation of the 1st term of the formula is optimized
as: 1 * n/r * (n-1)/(r-1) * (n-2)/(r-2) * .....(n 1-r)/1,
eliminating the need to calculate the factorials.
(output OK)
*/
double binom_prob(double p, double n, double x)
{
double k, t1, t2, t3;
if(x > n)
{
if(x > n)
{
fprintf(stderr, "error: successes param > events"
" param in binom_prob()\n");
exit(EXIT_FAILURE);
}
k = 1.0;
t1 = n / x;
while(k < x)
{
t1 *= (n - k) / (x - k);
k ;
}
t2 = pow(p, x);
t3 = pow(1.0-p, n-x);
return t1 * t2 * t3;
}
/* Return the standardized random
variable for a small sample: n < 30. (output OK) */
double stdx(double mean, double sdev, double x)
{
return (x - mean) / sdev;
}
/* Return the standardized random
variable for a large sample: n >= 30.
(not checked)
*/
double stdx_lg(double xbar, /* sample mean */
double mu, /* true mean */
double sdev, /* sample std dev */
double n) /* sample size */
{
return (xbar - mu) / (sdev / sqrt(n));
}
/*
Return the normal probability density
at x for a specified mean and std dev:
/ 1 \
f(x) =| ------------------- | (e ^ -.5((x-mean)/stdev)^2)
\(stdev)(sqrt(2*pi))/
(output OK)
*/
double norm_pdf(double mean, double stdev, double x)
{
double a, b;
a = 1.0 / (stdev * sqrt(2.0 * PI));
b = ((x - mean) / stdev) * ((x - mean) / stdev);
b *= -.5;
return a * exp(b);
}
/* Return the normal cumulative probability of x
for a specified mean and standard deviation.
(output OK)
*/
double norm_cdf(double mean, double stdev, double x)
{
x = stdx(mean, stdev, x);
return std_ncurve_area(-5.0, x);
}
/*
Return an approximation of the area under
the standard normal curve between X1 and X2
by calculating the area of rectangles under
the curve.
The equation of the standard normal curve is
used to find the distance between a point on
the zero line and the curve, i.e. the longer
side of each rectangle.
The area is equal to the probability that
the standardized random variable Z lies
between X1 and X2.
(output OK)
*/
double std_ncurve_area(double X1, double X2)
{
double a, b, longside, area, x;
area = 0.0;
a = 1.0 / sqrt(2.0 * PI);
for(x = X1; x <= X2; x = INCR)
{
b = -.5 * (x * x);
longside = a * exp(b);
area = longside * INCR;
}
return area;
}
/* Return the kth percentile of the std normal distribution.
k = [.01, .02, ..., .99] (output OK) */
double std_norm_ptile(double k)
{
double diff, lastdiff, limit, x, y;
diff = 1.0;
if(k >= .01 && k <= .1) x = -2.5, limit = -1.25;
else if(k > .1 && k <= .2) x = -1.3, limit = -.75;
else if(k > .2 && k <= .3) x = -.9, limit = -.5;
else if(k > .3 && k <= .4) x = -.55, limit = -.2;
else if(k > .4 && k <= .5) x = -.25, limit = .05;
else if(k > .5 && k <= .6) x = -.01, limit = .3;
else if(k > .6 && k <= .7) x = .24, limit = .6;
else if(k > .7 && k <= .8) x = .5, limit = .9;
else if(k > .8 && k <= .9) x = .8, limit = 1.3;
else if(k > .9 && k <= .99) x = 1.25, limit = 2.35;
else
{
fprintf(stderr, "error: invalid input to std_norm_ptile()\n");
exit(EXIT_FAILURE);
}
for(; x <= limit; x = .01)
{
lastdiff = diff;
y = std_ncurve_area(-4.0, x);
diff = fabs(y - k);
if(diff > lastdiff)
{
return x - .01;
}
}
return 0;
}
/* Return the Anderson-Darling statistic to test whether
the sample data are normally distributed. The statistic
is compared to critical values given in a table.
*/
double anderson_darling_norm(double *datalist, int listsize)
{
int idx;
double t1, t2, t3, sum;
double amean, sd, cdf;
qsort(datalist, listsize, sizeof(*datalist), compare);
amean = a_mean(datalist, listsize);
sd = s_stdev(datalist, listsize);
sum = 0.0;
for(idx = 0; idx < listsize; idx )
{
t1 = ((2.0 * (idx 1)) - 1.0) / listsize;
cdf = norm_cdf(amean, sd, datalist[idx]);
t2 = log(cdf);
cdf = norm_cdf(amean, sd, datalist[listsize-(idx 1)]);
t3 = log(1.0 - cdf);
sum = (t1 * (t2 t3));
}
return (-listsize) - sum;
}
/* Return a boolean value indicating whether the normal
distribution can be used to approximate the binomial.
Mean = np and variance = nq (where q=1-p) are
considered good normal approximations if np and
nq are both > 5.
p=[0,1] n=a positive integer (output OK)
*/
int norm_approx_ok(double p, double n)
{
return n*p > 5.0 && n*(1.0-p) > 5.0;
}
/* Return a pointer to an array containing the
mean and variance for a normal approximation
to the binomial distribution
p=[0,1] n=a positive integer (output OK)
*/
double* norm_approx_mv(double p, double n)
{
double q;
double *mv = malloc(2 * sizeof(*mv));
if(mv == NULL)
{
fprintf(stderr, "malloc failed in norm_approx_mv()\n");
exit(EXIT_FAILURE);
}
q = 1.0 - p;
mv[0] = n * p; /* mean */
mv[1] = n * p * q; /* variance */
return mv;
}
/* Return a z-score for a hypothesis test.
EP=expected proportion of successes,
op=observed proportion of successes,
n=number of trials
*/
double rndz(double EP, double op, double n)
{
double num, den;
num = op - EP;
den = sqrt((EP * (1.0 - EP)) / n);
return num / den;
}
/* Return log normal probability density at x.
mu=a_mean(ln(X)); sigma=s_stdev(ln(X)) (output OK) */
double log_norm_pdf(double x, double mu, double sigma)
{
double t1, t2num, t2den;
if(x <= 0.0) return 0.0;
t1 = 1.0 / (sqrt(2.0 * PI) * sigma * x);
t2num = -((log(x) - mu) * (log(x) - mu));
t2den = (2.0 * (sigma * sigma));
return t1 * exp(t2num / t2den);
}
/* Return Gamma(z):
6
S(q[n] * z^n)
n=0
Gamma(z) = -------------- * ((z 5.5)^(z .5)) * (e^-(z 5.5))
6
P(z n)
n=0
This is based on the Lanczos approximation
of the Gamma function. The formula and
constants (but not the code itself) are from
"Numerical Recipes in C." (output OK)
*/
double gamma(double x)
{
double z, n, dent1, numt1, t1, t2, t3;
double q[] = {75122.6331530,
80916.6278952,
36308.2951477,
8687.24529705,
1168.92649479,
83.8676043424,
2.50662827511};
z = x;
numt1 = 0.0;
dent1 = 1.0;
for(n = 0.0; n <= 6.0; n )
{
numt1 = q[(int)n] * pow(z, n);
dent1 *= (z n);
}
t1 = numt1 / dent1;
t2 = pow(z 5.5, z 0.5);
t3 = exp(-(z 5.5));
return t1 * t2 * t3;
}
/* Return the natural log of gamma(x) */
double log_gamma(double x)
{
int idx, sizep;
double r, g;
double p[] = {1.000000000190015,
76.18009172947146,
-86.50532032941677,
24.01409824083091,
-1.231739572450155,
1.208650973866179E-3,
-5.395239384953E-6};
r = p[0];
g = 5.;
sizep = sizeof(p) / sizeof(*p);
for (idx = 1; idx < sizep; idx )
{
r = p[idx] / (x idx);
}
return log(r) log(atan(1) * 8) / 2 - log(x)
log(x g .5) * (x .5) - (x g .5);
}
}
/* Return beta(a, b) (output OK) */
double beta(double a, double b)
{
return (gamma(a) * gamma(b)) / gamma(a b);
}
/* Return p.d.f. of the standard beta distribution
where 0 < x < 1. a & b are shape parameters.
(output OK) */
double std_betapdf(double x, double a, double b)
{
double t1, t2, t3;
t1 = pow(x, a - 1.0);
t2 = pow(1.0 - x, b - 1.0);
t3 = beta(a, b);

return (t1 * t2) / t3;
}
/* Return beta dist p.d.f where A < x < B.
a & b are shape parameters. (output OK) */
double betapdf(double x, double a, double b, double A, double B)
{
double t1, t2, t3, t4;
t1 = 1.0 / (B - A);
t2 = (gamma(a b)) / (gamma(a) * gamma(b));
t3 = pow((x - A) / (B - A), a - 1.0);
t4 = pow((B - x) / (B - A), b - 1.0);
return t1 * t2 * t3 * t4;
}
/* Return the approximate area under beta curve in the
interval [X1, X2]. a & b are shape parameters.
The case A=0, B=1 gives the standard beta distribution.
*/
double beta_curve_area(double a, double b, double A,
double B, double X1, double X2)
{
double t1, t2, t3, t4, fx, x;
double area = 0.0;
for(x = X1; x <= X2; x = .001)
{
t1 = 1.0 / (B - A);
t2 = (gamma(a b)) / (gamma(a) * gamma(b));
t3 = pow((x - A) / (B - A), a - 1.0);
t4 = pow((B - x) / (B - A), b - 1.0);
fx = t1 * t2 * t3 * t4;
area = fx * .001;
}
return area;
}
/* Return probability density of the t-distribution
for t, where v is degrees of freedom and G is
the Gamma function.
G((v 1) / 2)
f(t) = ----------------------- * (1 (t^2) / 2)
sqrt(v * PI) * G(v / 2)
(output OK)
*/
double tdist(double t, double v)
{
double numt1, dent1, t1, t2;
numt1 = gamma((v 1.0) / 2.0);
dent1 = (sqrt(v * PI)) * (gamma(v / 2.0));
t1 = numt1 / dent1;
t2 = pow(1.0 (t * t) / v, -((v 1.0) / 2.0));
return t1 * t2;
}
/* Return t-distribution cumulative probability
for the interval [X1,X2], where v=degrees of freedom.
For the total area left of X2, let X1 = -6.0.
This uses the same method for calculating an
area under the t-curve as std_ncurve_area().
(output OK)
*/
double tdist_cum(double X1, double X2, double v)
{
double longside, area, x;
area = 0.0;
for(x = X1; x <= X2; x = INCR)
{
longside = tdist(x, v);
area = longside * INCR;
}
return area;
}

/* Return unpaired Student's t for 2 samples:
__ __
X1 - X2
t = ---------------------
/------------------
/ s^2 s^2
/ ---- ----
\/ n1 n2
(output OK)
*/
double t_test2(double *X1, double *X2, double n1, double n2)
{
double var1, var2, mu1, mu2, dt1, dt2;
var1 = svar(X1, n1);
var2 = svar(X2, n2);
mu1 = a_mean(X1, n1);
mu2 = a_mean(X2, n2);
dt1 = var1 / n1;
dt2 = var2 / n2;
return (mu1 - mu2) / sqrt(dt1 dt2);
}
/* Return Student's t for 1 sample:
_
X - mu
t = --------------
ssd / sqrt(n)
(output OK)
*/
double t_test1(double *datalist, int listsize, double mu)
{
double smean, ssd;
smean = a_mean(datalist, listsize);
ssd = s_stdev(datalist, listsize);
return (smean-mu) / (ssd/sqrt((double)listsize));
}
/* Return t-test degrees of freedom for 2 samples.
(output OK) */
int df(double n1, double n2)
{
return (int)(n1 n2) - 2.0;
}
/* Return a pointer to an array containing the limits
of the 95% normal distribution confidence interval
around a sample mean. (output OK)
*/
double* confidence_95(double *datalist, int listsize)
{
double mean, psd;
double *ci = malloc(2 * sizeof(*ci));
if(ci == NULL)
{
fprintf(stderr, "malloc failed in confidence_95()\n");
exit(EXIT_FAILURE);
}
mean = a_mean(datalist, listsize);
psd = p_stdev(datalist, listsize);
mean = a_mean(datalist, listsize);
psd = p_stdev(datalist, listsize);
ci[0] = mean - NORM_ALPHA05 * (psd / sqrt((double)listsize));
ci[1] = mean NORM_ALPHA05 * (psd / sqrt((double)listsize));
return ci;
}
/* Return a pointer to an array containing the limits
of the 99% normal distribution confidence interval
around a sample mean. (output OK)
*/
double* confidence_99(double *datalist, int listsize)
{
double mean, psd;
double *ci = malloc(2 * sizeof(*ci));
if(ci == NULL)
{
fprintf(stderr, "malloc failed in confidence_99()\n");
exit(EXIT_FAILURE);
}
mean = a_mean(datalist, listsize);
psd = p_stdev(datalist, listsize);
ci[0] = mean - NORM_ALPHA01 * (psd / sqrt((double)listsize));
ci[1] = mean NORM_ALPHA01 * (psd / sqrt((double)listsize));
return ci;
}

/* misc utility ---------------------------------------- */
/* qsort comparison function */
int compare(const void* a, const void* b)
{
int retval;
/* sort in ascending order */
if(*(double*)a < *(double*)b) retval = -1;
if(*(double*)a == *(double*)b) retval = 0;
if(*(double*)a > *(double*)b) retval = 1;
return retval;
}

/* Return the rth root of n. */
double root(double n, double r)
{
double t, x, y;
x = log(n);
y = x / r;
t = exp(y);
return t;
}
---------------------------------------------------------------------分隔線-----------------------------------------------------------------------
/* test statistical functions
compile with statlib.c */
#include
#include
#include <math.h><br />#include
#include "statlib.h"
int main(void)
{
int listsize, idx;
double sm, rnge, amean, mrange, med, ptile, sk, iqrng,
mod, s_var, p_var, ssdev, psdev, xsqr, gmean, hmean,
rmsqr, kurt, md, sem, cv, tuk, trim, ktile;
double *qt, *mnmx, *conf95, *conf99;
//double data[] = {32.75, 25, 58.3, 42.95, 37.5, 29.75, 47, 21.8, 63.5, 30.45, 58.3, 18.75};
//double data[] = {31,29,26,33,40,28,30,25};
//double data[] = {1, 4, 9, 16, 25, 36, 49, 64, 81};
//double data[] = {60, 72, 64, 67, 70, 68, 71, 68, 73, 59};
//double data[] = {23,31,40,51,67,73,82,91,102,
// 110,120,130,140,150,155,156};
//double data[] = {1.778,1.995,2.887,2.997,3.332,8.556,11.8866};
//double data[] = {1,1,2,2,2,3,3,3,3,4,4,4,4,4,5,5,5,5,5,5,
// 6,6,6,6,6,7,7,7,7,8,8,8,9,9};
double data[] = {1987,1987,1991,1992,1992,1992,1992,1993,1994,1994,1995};
listsize = sizeof(data) / sizeof(*data);
ktile = 30.0; /* argument to percentile() */
printf("\n%d data:\n", listsize);
for(idx = 0; idx < listsize; idx )
{
printf("%.3f ", data[idx]);
}
sm = sum(data, listsize);
mnmx = min_max(data, listsize);
rnge = range(data, listsize);
amean = a_mean(data, listsize);
gmean = g_mean(data, listsize);
hmean = h_mean(data, listsize);
tuk = tukeys_trimean(data, listsize);
trim = trimmed_mean(data, listsize, 20.0);
mrange = midrange(data, listsize);
med = median(data, listsize);
ptile = percentile(data, listsize, ktile);
qt = quartiles(data, listsize);
ptile = percentile(data, listsize, ktile);
qt = quartiles(data, listsize);
iqrng = interquartile_range(data, listsize);
mod = mode(data, listsize);
s_var = svar(data, listsize);
p_var = pvar(data, listsize);
rmsqr = rms(data, listsize);
psdev = p_stdev(data, listsize);
ssdev = s_stdev(data, listsize);
cv = coeff_var(data, listsize);
md = mean_dev(data, listsize);
sem = std_err_mean(data, listsize);
sk = skewness(data, listsize);
kurt = kurtosis(data, listsize);
xsqr = chi_square(data, listsize);
conf95 = confidence_95(data, listsize);
conf99 = confidence_99(data, listsize);
printf("\n\nsum: %.3f\n", sm);
printf("min/max: %.3f/%.2f\n", mnmx[0], mnmx[1]);
printf("range: %.3f\n", rnge);
printf("arithmetic mean: %.3f\n", amean);
printf("geometric mean: %.3f\n", gmean);
printf("harmonic mean: %.3f\n", hmean);
printf("Tukey's trimean: %.3f\n", tuk);
printf("trimmed mean(20%%): %.3f\n", trim);
printf("midrange: %.3f\n", mrange);
printf("median: %.3f\n", med);
printf("%.fth percentile: %.3f\n", ktile, ptile);
printf("quartiles: %.3f %.3f %.3f\n", qt[0],qt[1],qt[2]);
printf("interquartile range: %.3f\n", iqrng);
printf("mode: %.3f\n", mod);
printf("sample variance: %.3f\n", s_var);
printf("population variance: %.3f\n", p_var);
printf("root mean square: %.3f\n", rmsqr);
printf("population standard deviation: %.3f\n", psdev);
printf("sample standard deviation: %.3f\n", ssdev);
printf("coefficient of variability: %.3f\n", cv);
printf("mean deviation: %.3f\n", md);
printf("standard error of the mean: %.3f\n", sem);
printf("skewness: %f\n", sk);
printf("kurtosis: %f\n", kurt);
printf("chi square: %.3f\n", xsqr);
printf("95%% confidence interval: %.3f - %.3f\n", conf95[0], conf95[1]);
printf("99%% confidence interval: %.3f - %.3f\n", conf99[0], conf99[1]);
printf("95%% confidence interval: %.3f - %.3f\n", conf95[0], conf95[1]);
printf("99%% confidence interval: %.3f - %.3f\n", conf99[0], conf99[1]);
free(qt);
free(mnmx);
free(conf95);
free(conf99);
return 0;
}
---------------------------------------------完------------------------------------------------------
還請各位高手來解答>"<拜託了!
pcboy
版主


發表:177
回覆:1838
積分:1463
註冊:2004-01-13

發送簡訊給我
#2 發表時間:2006-12-25 08:21:08 IP:210.241.xxx.xxx 未訂閱
請盡量不要用含糊不清的標題
------
能力不足,求助於人;有能力時,幫幫別人;如果您滿意答覆,請適時結案!

子曰:問有三種,不懂則問,雖懂有疑則問,雖懂而想知更多則問!
max90209
一般會員


發表:1
回覆:6
積分:1
註冊:2006-12-25

發送簡訊給我
#3 發表時間:2006-12-25 10:22:54 IP:203.64.xxx.xxx 訂閱
要怎麼樣才算是不含糊的標題?
整個題目打在標題就不會含糊了嗎?還是?
taishyang
站務副站長


發表:377
回覆:5490
積分:4563
註冊:2002-10-08

發送簡訊給我
#4 發表時間:2006-12-25 20:17:55 IP:59.124.xxx.xxx 訂閱
pcboy2 前輩是希望你不要用[請各位高手幫忙解題>"<急!拜託了! ] 這類沒有意義的標題

請修正,否則恕刪


===================引 用 文 章===================

要怎麼樣才算是不含糊的標題?
整個題目打在標題就不會含糊了嗎?還是?
max90209
一般會員


發表:1
回覆:6
積分:1
註冊:2006-12-25

發送簡訊給我
#5 發表時間:2006-12-25 23:42:45 IP:203.64.xxx.xxx 訂閱
愛刪就刪呀,反正只讓我覺得你們就像挑別人語病的遜咖
真正會解的人又有多少?你們有時間挑這些毛病,為什麼不去解題?
刪啊,反正c 論壇又不是只有這一間,
我的標題又沒有騙你們進來看,是真的很急要解題目,
做不出來就不要在那邊講有的沒有的,
刪文?我看你乾脆把我整個刪掉好了,我才懶得待在這。
taishyang
站務副站長


發表:377
回覆:5490
積分:4563
註冊:2002-10-08

發送簡訊給我
#6 發表時間:2006-12-26 00:53:02 IP:218.168.xxx.xxx 訂閱
請你修改標題這樣叫做[挑語病的遜咖]?
這種態度會有人想幫你?
這篇文章很經典,所以我決定讓它置頂,讓發問者參考何謂[沒有意義的標題]
以及注意[發問該有的禮節]


===================引 用 文 章===================

愛刪就刪呀,反正只讓我覺得你們就像挑別人語病的遜咖
真正會解的人又有多少?你們有時間挑這些毛病,為什麼不去解題?
刪啊,反正c 論壇又不是只有這一間,
我的標題又沒有騙你們進來看,是真的很急要解題目,
做不出來就不要在那邊講有的沒有的,
刪文?我看你乾脆把我整個刪掉好了,我才懶得待在這。
max90209
一般會員


發表:1
回覆:6
積分:1
註冊:2006-12-25

發送簡訊給我
#7 發表時間:2006-12-26 01:50:42 IP:203.64.xxx.xxx 訂閱
謝謝抬舉
我就算解不出來也不想問你
甚至我還懷疑你有沒有能力解?
高手這麼多 不缺你這一個
不過是一個題目而已
大不了我再去問別人
省得在這邊瞎耗
有時間糾正別人的標題不如多充實自己有沒有能力解
板主就是板主
要怎樣就怎樣 那置不置頂又干我屁事?
快點把我退一退好嗎?我懶得在這跟你這個不知道有沒有能力解題的”板主”耗時間
掰掰 哈哈
另外 我的態度? 印在衣服上呀?沒看到嗎? 白t綠字!哈哈哈哈
想糾正我的態度 那就拿簽字筆來塗改吧!^_^
暗黑破壞神
版主


發表:9
回覆:2301
積分:1627
註冊:2004-10-04

發送簡訊給我
#8 發表時間:2006-12-26 08:34:51 IP:220.131.xxx.xxx 訂閱
我想問一下:
1.你列了這麼長的東西。那是什麼?函數庫????
2.我想知道,你現在問題在那裏?不知道怎麼寫?寫不出來?還是寫出來有問題,要我幫忙改?還是要我幫忙寫程式?
我先就我提的回答你:
A.對於站上所列的程式碼。只要超過六行,我就不看了。老實跟你說,我有閱讀障礙。別笑我。等你老了就知道。
所以可以把問題精簡到六行以內來發問嗎?我一定會幫你。

B.再來。如果是要我幫你寫程式的話。我的價碼是一行一美金。為了美觀加的空行,註解照算。
因為 layout 可以用一點 18-30 元的收費方式。一顆 144 腳的 ARM 一放上去。就是要2K 以上的價格。
我寫程式比那樣考慮的更多,當然,收的費用至少要比照辦理。怎麼可以對不起自己。

C.如果嫌我的收費太貴?你可以去學校找同學找老師來做習題。我不反對。因為付不起錢的人,沒資格來跟我談。
通常我一年只做一個案子。而這個案子都是我獨力完成。而會找到我的,都是在外面無法找到合適的廠商才會找到我。
所以,他們付得起,也不得不付這個費用。

D.所以,我也想知道。如果你可以在我所回答的A裏,把問題縮到六行內。我可以免費為你解答。
如果你做不到。表示你不用心。我個人可以免費的提供好學者一個提示,以提昇台灣的競爭力。
但是對於自己不想學而只想要拿答案的人。對不起。你得要付費來解答。

不要懷疑我的實力,我用 C 的年資已經快20年了。當大家在用 clipper 時,我就在用它寫程式了。

不知道其他人的看法是不是跟我一樣?

===================引 用 文 章===================
依所冷統計程式(函式庫),請建立你自己的統甫計算軟體系統。你所建立之系統需至少能夠符合以下各要求。
a)輸入方式:使用者可由銀幕詢問狀況下輸入資料,或由使用考選擇由檔案輸入資料。(兩樣階需俱備)
b)統計函式:至少需包含(1)mean(平均數),(2)median(中位數),(3)mode(眾數),(4)全距(range),(5)標準差(standard deviation)『注意:標準差有樣本及母體之差異』
c)輸出方式:使用者可選擇將計算結果輸出至銀幕或輸出至檔案。(兩樣階需俱備)
測試資料如下:

.......
max90209
一般會員


發表:1
回覆:6
積分:1
註冊:2006-12-25

發送簡訊給我
#9 發表時間:2006-12-26 10:04:19 IP:203.64.xxx.xxx 訂閱
原來討論區也可以賺錢 真不簡單 請問全國就只有你會寫?
我一定要付費叫你寫?不要把自己講得跟神一樣。
板主什麼時候才要退我 煩耶 快啦

===================引 用 文 章===================
我想問一下:
1.你列了這麼長的東西。那是什麼?函數庫????
2.我想知道,你現在問題在那裏?不知道怎麼寫?寫不出來?還是寫出來有問題,要我幫忙改?還是要我幫忙寫程式?
我先就我提的回答你:
A.對於站上所列的程式碼。只要超過六行,我就不看了。老實跟你說,我有閱讀障礙。別笑我。等你老了就知道。
所以可以把問題精簡到六行以內來發問嗎?我一定會幫你。

B.再來。如果是要我幫你寫程式的話。我的價碼是一行一美金。為了美觀加的空行,註解照算。
因為 layout 可以用一點 18-30 元的收費方式。一顆 144 腳的 ARM 一放上去。就是要2K 以上的價格。
我寫程式比那樣考慮的更多,當然,收的費用至少要比照辦理。怎麼可以對不起自己。

C.如果嫌我的收費太貴?你可以去學校找同學找老師來做習題。我不反對。因為付不起錢的人,沒資格來跟我談。
通常我一年只做一個案子。而這個案子都是我獨力完成。而會找到我的,都是在外面無法找到合適的廠商才會找到我。
所以,他們付得起,也不得不付這個費用。

D.所以,我也想知道。如果你可以在我所回答的A裏,把問題縮到六行內。我可以免費為你解答。
如果你做不到。表示你不用心。我個人可以免費的提供好學者一個提示,以提昇台灣的競爭力。
但是對於自己不想學而只想要拿答案的人。對不起。你得要付費來解答。

不要懷疑我的實力,我用 C 的年資已經快20年了。當大家在用 clipper 時,我就在用它寫程式了。

不知道其他人的看法是不是跟我一樣?

===================引 用 文 章===================

依所冷統計程式(函式庫),請建立你自己的統甫計算軟體系統。你所建立之系統需至少能夠符合以下各要求。
a)輸入方式:使用者可由銀幕詢問狀況下輸入資料,或由使用考選擇由檔案輸入資料。(兩樣階需俱備)
b)統計函式:至少需包含(1)mean(平均數),(2)median(中位數),(3)mode(眾數),(4)全距(range),(5)標準差(standard deviation)『注意:標準差有樣本及母體之差異』
c)輸出方式:使用者可選擇將計算結果輸出至銀幕或輸出至檔案。(兩樣階需俱備)
測試資料如下:

.......
Coffee
版主


發表:31
回覆:878
積分:561
註冊:2006-11-15

發送簡訊給我
#10 發表時間:2006-12-26 10:06:42 IP:220.130.xxx.xxx 訂閱
就是有這種人,新一代的學生才會被認為一點長進也沒有。
作業寫不出來找別人抄應該要自己想想了,
來找人要答案也不懂得低聲下氣,還可以理直氣壯厚顏無恥的說出這種話,不簡單。
不過,我想各位前輩不用再生氣了,就算是圍剿這種人也沒用,牽到北京也是一樣,
要嘛就是消失不看了,要嘛就是多搞幾個帳號來把這搞的烏煙瘴氣的,
沒必要為了這種人搞的自己情緒不好還破壞了站上的風氣。
------
不論是否我發的文,在能力範圍皆很樂意為大家回答問題。
為了補我的能力不足之處,以及讓答案可以被重複的使用,希望大家能儘量以公開的方式問問題。
在引述到我的文時自然會儘量替各位想辦法,謝謝大家!
taishyang
站務副站長


發表:377
回覆:5490
積分:4563
註冊:2002-10-08

發送簡訊給我
#11 發表時間:2006-12-26 10:28:54 IP:59.124.xxx.xxx 訂閱
不好意思,因為之前提到這篇文章很經典足以做為範本,所以我不會將這篇文章刪除
至於違反了哪些規定以下做說明:

1.標題含糊不清,以及含有[急][拜託了]等無意義的字眼
2.個人感覺是明顯的[作業文]
3.發問的態度以及禮節

這些任何一項都足以將該文刪除之.

另外,建議發問者可以將問題給濃縮,並標明問題在哪裡,這樣有經驗的前輩們才快速的知道問題出在哪邊





===================引 用 文 章===================

原來討論區也可以賺錢 真不簡單 請問全國就只有你會寫?
我一定要付費叫你寫?不要把自己講得跟神一樣。
板主什麼時候才要退我 煩耶 快啦


Coffee
版主


發表:31
回覆:878
積分:561
註冊:2006-11-15

發送簡訊給我
#12 發表時間:2006-12-26 10:37:44 IP:220.130.xxx.xxx 訂閱
不好意思,借用版主的文章,可否加上「不要錯別字」、「不要不選字」、「不要注音文」..:P
===================引 用 文 章===================
不好意思,因為之前提到這篇文章很經典足以做為範本,所以我不會將這篇文章刪除
至於違反了哪些規定以下做說明:
1.標題含糊不清,以及含有[急][拜託了]等無意義的字眼
2.個人感覺是明顯的[作業文]
3.發問的態度以及禮節

這些任何一項都足以將該文刪除之.

另外,建議發問者可以將問題給濃縮,並標明問題在哪裡,這樣有經驗的前輩們才快速的知道問題出在哪邊

------
不論是否我發的文,在能力範圍皆很樂意為大家回答問題。
為了補我的能力不足之處,以及讓答案可以被重複的使用,希望大家能儘量以公開的方式問問題。
在引述到我的文時自然會儘量替各位想辦法,謝謝大家!
taishyang
站務副站長


發表:377
回覆:5490
積分:4563
註冊:2002-10-08

發送簡訊給我
#13 發表時間:2006-12-26 10:43:09 IP:59.124.xxx.xxx 訂閱
感謝您的建議,我想錯別字在所難免,但我已經將[禁用注音文發問]加入板規中 ^_^


===================引 用 文 章===================
不好意思,借用版主的文章,可否加上「不要錯別字」、「不要不選字」、「不要注音文」..:P

max90209
一般會員


發表:1
回覆:6
積分:1
註冊:2006-12-25

發送簡訊給我
#14 發表時間:2006-12-26 11:45:27 IP:203.64.xxx.xxx 訂閱
我還以為加入這裡的高手都是以寫程式有成就感才加入這裡
沒想到連一題都沒解出來還拉賽一堆
作業又怎樣?你沒抄過?你聖人?
咖啡同學:我不知道你是誰,但這又干你什麼事?自認為高手就多嘴?算了,討論區嘛,就是會有一堆出一張嘴的,但是不是你我不知道。
板主不退我喔?沒差,反正我也不會再來這種破論壇
我還以為高手以寫程式寫出來有成就感所以才寫的,沒想到說穿了還不是要錢
現實喔~哈哈
拼命糾正我的態度,你們有沒有想過你們的態度,不要自以為會寫程式就在那邊清高
會寫程式又怎樣?你一定每項都比別人強?搞不好你們也只有c語言比我強就在那邊清高
人有自己的路,c語言不是我要走的,只是要應付作業,怎麼樣,說到這開心了嗎?
渣得讓我很無言(沒有指誰)
===================引 用 文 章===================

感謝您的建議,我想錯別字在所難免,但我已經將[禁用注音文發問]加入板規中 ^_^


===================引 用 文 章===================
不好意思,借用版主的文章,可否加上「不要錯別字」、「不要不選字」、「不要注音文」..:P

taishyang
站務副站長


發表:377
回覆:5490
積分:4563
註冊:2002-10-08

發送簡訊給我
#15 發表時間:2006-12-26 12:06:19 IP:59.124.xxx.xxx 訂閱

之前提到,這篇文章足以當範本所以不會刪除.
您不是說不來了,幹嘛繼續回應呢^^?

===================引 用 文 章===================

我還以為加入這裡的高手都是以寫程式有成就感才加入這裡
沒想到連一題都沒解出來還拉賽一堆
作業又怎樣?你沒抄過?你聖人?
咖啡同學:我不知道你是誰,但這又干你什麼事?自認為高手就多嘴?算了,討論區嘛,就是會有一堆出一張嘴的,但是不是你我不知道。
板主不退我喔?沒差,反正我也不會再來這種破論壇
我還以為高手以寫程式寫出來有成就感所以才寫的,沒想到說穿了還不是要錢
現實喔~哈哈
拼命糾正我的態度,你們有沒有想過你們的態度,不要自以為會寫程式就在那邊清高
會寫程式又怎樣?你一定每項都比別人強?搞不好你們也只有c語言比我強就在那邊清高
人有自己的路,c語言不是我要走的,只是要應付作業,怎麼樣,說到這開心了嗎?
渣得讓我很無言(沒有指誰)


max90209
一般會員


發表:1
回覆:6
積分:1
註冊:2006-12-25

發送簡訊給我
#16 發表時間:2006-12-26 12:08:24 IP:203.64.xxx.xxx 訂閱
沒辦法 系統自己寄回覆信給我 就來看看囉 
為了避免再看到一堆自以為的家伙 把系統通知信弄成垃圾信好了
好就這麼樣 耶 好榮幸 範本耶 哈哈
===================引 用 文 章===================


之前提到,這篇文章足以當範本所以不會刪除.
您不是說不來了,幹嘛繼續回應呢^^?

===================引 用 文 章===================

我還以為加入這裡的高手都是以寫程式有成就感才加入這裡
沒想到連一題都沒解出來還拉賽一堆
作業又怎樣?你沒抄過?你聖人?
咖啡同學:我不知道你是誰,但這又干你什麼事?自認為高手就多嘴?算了,討論區嘛,就是會有一堆出一張嘴的,但是不是你我不知道。
板主不退我喔?沒差,反正我也不會再來這種破論壇
我還以為高手以寫程式寫出來有成就感所以才寫的,沒想到說穿了還不是要錢
現實喔~哈哈
拼命糾正我的態度,你們有沒有想過你們的態度,不要自以為會寫程式就在那邊清高
會寫程式又怎樣?你一定每項都比別人強?搞不好你們也只有c語言比我強就在那邊清高
人有自己的路,c語言不是我要走的,只是要應付作業,怎麼樣,說到這開心了嗎?
渣得讓我很無言(沒有指誰)


暗黑破壞神
版主


發表:9
回覆:2301
積分:1627
註冊:2004-10-04

發送簡訊給我
#17 發表時間:2006-12-26 12:23:05 IP:220.131.xxx.xxx 訂閱
---- 引言 ---
會寫程式又怎樣?你一定每項都比別人強?搞不好你們也只有c語言比我強就在那邊清高
人有自己的路,c語言不是我要走的,只是要應付作業,怎麼樣,說到這開心了嗎?
--- 引言結束 ---

是啊。會寫程式又怎樣。還是你想要比其它的勒?電路板怎麼洗?單晶片怎麼用?
化粧品要怎麼做?食品加工如何處理?GMP 廠要怎麼蓋?
你要是得癌症。要怎麼給你吃藥。怎麼治療。
這些我都可以跟你談。

不比C語言。我可以陪你由 asm 開始到 OS 自己寫一個出來。
不比 PC 我可以由 Intel 的 X86 跟你比 ARM, MIPS, 8051....etc
你先秤一下自己的斤兩。

來這邊我不是為了賺錢。但是有些人就是除了叫他付錢。他是搞不清楚狀況的。

比較重要的一點是。你既然當一天和尚,就要撞一天的鐘。
不然你頂著這個學歷出來社會。害死了業界。

作業你就自己去抄吧。在這個版,不會有人”全程”幫忙作業的。
Coffee
版主


發表:31
回覆:878
積分:561
註冊:2006-11-15

發送簡訊給我
#18 發表時間:2006-12-26 12:36:53 IP:220.130.xxx.xxx 訂閱
Yap, 我只出一張嘴,在這裡很多人都只出一張嘴,只不過你太髒了..:P
說到我們以寫程式為樂,是的,我們不少人以寫程式為樂,但是是以解有難度的問題為樂,
以幫助那些會自己動腦想而不是那些恬不知恥的傢伙為樂,
我可沒說我沒抄過沒應付過,起碼我抄的時候還有羞恥心,看你這樣大概是一點也不剩吧,
何必拐彎抹角呢?你就是指我,我就是指你

我在參與這個論壇很久了,看到這種免不了多個幾句話,因為對你來說我也只有一張嘴,
看你這個樣子,連一張嘴的功能也沒有,看看論壇上這些人發表的文章了嗎?
沒有對吧,好歹我還用這個帳號發表過MSNPopup的破爛修改版,改個元件都比你這作業有成就多了。
解你這種題目只是浪費我的時間而已。

像你這樣何必讓你稱心如意的完成學業?沒那個必要吧?難不成這世界真的那麼快活,不願意作的事都可以跳過?
話說現在學歷泛濫,充斥這像你這樣喊著畢業卻因為找不到錢多事少離家近的工作而失業的人。
好吧,我承認,我除了寫程式以外,就你知道的真的沒有比你強的,不過好歹在字面上我就強你這麼一項,還真是對不起..:P
會寫程式真的不怎麼樣,只不過這裡的前輩就是會寫程式,是你來錯地方,不是我們給錯位置
------
不論是否我發的文,在能力範圍皆很樂意為大家回答問題。
為了補我的能力不足之處,以及讓答案可以被重複的使用,希望大家能儘量以公開的方式問問題。
在引述到我的文時自然會儘量替各位想辦法,謝謝大家!
ddy
站務副站長


發表:262
回覆:2105
積分:1169
註冊:2002-07-13

發送簡訊給我
#19 發表時間:2008-09-09 09:04:11 IP:203.70.xxx.xxx 訂閱
良心建議,謙虛學習才是上策
討論區當然不只ktop這間啦~~不過我保證您這樣的問法與態度…到那裡都會碰壁
這些版主是太熱心了,所以才想教你一點做人做事的道理

沒人強迫你在這裡發問,既然要發問,當然要遵守這裡的遊戲規則,也是合理應該的事,是吧


===================引 用 max90209 文 章===================
原來討論區也可以賺錢 真不簡單 請問全國就只有你會寫?
我一定要付費叫你寫?不要把自己講得跟神一樣。
板主什麼時候才要退我 煩耶 快啦

===================引 用 文 章===================
我想問一下:
1.你列了這麼長的東西。那是什麼?函數庫????
2.我想知道,你現在問題在那裡?不知道怎麼寫?寫不出來?還是寫出來有問題,要我幫忙改?還是要我幫忙寫程式?
我先就我提的回答你:
A.對於站上所列的程式碼。只要超過六行,我就不看了。老實跟你說,我有閱讀障礙。別笑我。等你老了就知道。
所以可以把問題精簡到六行以內來發問嗎?我一定會幫你。

B.再來。如果是要我幫你寫程式的話。我的價碼是一行一美金。為了美觀加的空行,註解照算。
因為 layout 可以用一點 18-30 元的收費方式。一顆 144 腳的 ARM 一放上去。就是要2K 以上的價格。
我寫程式比那樣考慮的更多,當然,收的費用至少要比照辦理。怎麼可以對不起自己。

C.如果嫌我的收費太貴?你可以去學校找同學找老師來做習題。我不反對。因為付不起錢的人,沒資格來跟我談。
通常我一年只做一個案子。而這個案子都是我獨力完成。而會找到我的,都是在外面無法找到合適的廠商才會找到我。
所以,他們付得起,也不得不付這個費用。

D.所以,我也想知道。如果你可以在我所回答的A裡,把問題縮到六行內。我可以免費為你解答。
如果你做不到。表示你不用心。我個人可以免費的提供好學者一個提示,以提昇台灣的競爭力。
但是對於自己不想學而只想要拿答案的人。對不起。你得要付費來解答。

不要懷疑我的實力,我用 C 的年資已經快20年了。當大家在用 clipper 時,我就在用它寫程式了。

不知道其他人的看法是不是跟我一樣?

===================引 用 文 章===================
依所冷統計程式(函式庫),請建立你自己的統甫計算軟體系統。你所建立之系統需至少能夠符合以下各要求。
a)輸入方式:使用者可由銀幕詢問狀況下輸入資料,或由使用考選擇由檔案輸入資料。(兩樣階需俱備)
b)統計函式:至少需包含(1)mean(平均數),(2)median(中位數),(3)mode(眾數),(4)全距(range),(5)標準差(standard deviation)『注意:標準差有樣本及母體之差異』
c)輸出方式:使用者可選擇將計算結果輸出至銀幕或輸出至檔案。(兩樣階需俱備)
測試資料如下:
.......
taishyang
站務副站長


發表:377
回覆:5490
積分:4563
註冊:2002-10-08

發送簡訊給我
#20 發表時間:2008-09-09 14:11:00 IP:118.169.xxx.xxx 訂閱
ddy大哥:
這是一年前的文章 ^^||
不過因為你的回覆加上好其心使然,我用google查max90209,居然可以看到本人,哈

ddy
站務副站長


發表:262
回覆:2105
積分:1169
註冊:2002-07-13

發送簡訊給我
#21 發表時間:2008-09-09 17:52:32 IP:203.70.xxx.xxx 訂閱
哈…是喔…都要怪你啦…沒事弄什麼置頂…我還以為是新文章咧… 
羞~~~挖洞ing
===================引 用 taishyang 文 章===================
ddy大哥:
這是一年前的文章 ^^||
不過因為你的回覆加上好其心使然,我用google查max90209,居然可以看到本人,哈

jchong
一般會員


發表:0
回覆:1
積分:0
註冊:2007-12-27

發送簡訊給我
#22 發表時間:2008-12-12 16:10:05 IP:59.127.xxx.xxx 訂閱
各位前輩好:

因為這陣子想好好學習BCB再次回到這裡。
沒想到看到這篇經典文章,
並且看到 Max 本人。

我只能說本人跟發言內容還蠻搭的。
系統時間:2024-04-26 6:41:43
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!