易截截图软件、单文件、免安装、纯绿色、仅160KB

混凝土强度评定系统1.1 c代码

#define NULL 0
#define LEN 10
#define OK printf("\n此组数据合格。\n")
#define NO printf("\n此组数据不合格!\n")
#define CN printf("\n%30c 伟成工作室荣誉出品 %c\n",17,16)
#include "stdlib.h"
#include "math.h"
static float min,ave;       
float *zwfloat(void)        
{
    float *array,value;
    int size,count;
    size=LEN;
    array=malloc((size+1)*sizeof(float));
    if (array==NULL) return NULL;
    count=0;
    while (scanf("%f",&value),value!=0)   
    {
     if(value<0) continue;
        count+=1;
        if (count>size)      
        {
            size+=LEN;
            array=realloc(array,(size+1)*sizeof(float));
            if (array==NULL) return NULL;
        }
        array[count]=value;
    }
    if (count<size)          
    {
        array=realloc(array,(count+1)*sizeof(float));
        if (array==NULL) return NULL;
    }
    array[0]=count;       
    return array;
}
float stdev(float const *p)  
{
    int i;
    float sm=0.0;
    ave=0.0;min=p[1];
    if (p==NULL) return 0;
    for


相关文档:

C/C++——小编谈C语言函数那些事(6)

C程序是由一组或是变量或是函数的外部对象组成的。 函数是一个自我包含的完成一定相关功能的执行代码段。下面小编和大家分享下C语言中的函数。
1.       fclose函数
fclose函数的功能是关闭一个流,其用法是:int fclose(FILE *stream); 程序例子如下:
#include <string.h& ......

C字符串操作函数源码

 
#ifndef _PPC_BOOT_STRING_H_
#define _PPC_BOOT_STRING_H_
#include <stddef.h>
extern char *strcpy(char *dest, const char *src);
extern char *strncpy(char *dest, const char *src, size_t n);
extern char *strcat(char *dest, const char *src);
extern int strcmp(const char *s1, const cha ......

C/C++——小编谈C语言函数那些事(13)

C程序是由一组或是变量或是函数的外部对象组成的。 函数是一个自我包含的完成一定相关功能的执行代码段。下面小编和大家分享下C语言中的函数。
1.       malloc函数
malloc函数的功能是内存分配函数,其用法为:void *malloc(unsigned size);程序实例如下:
#include <stdio.h>
#i ......

C/C++——小编谈C语言函数那些事(14)

C程序是由一组或是变量或是函数的外部对象组成的。 函数是一个自我包含的完成一定相关功能的执行代码段。下面小编和大家分享下C语言中的函数。
 
1.       normvideo函数
 
malloc函数的功能是选择正常亮度字符,其用法为:void normvideo(void);程序实例如下:
#include < ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号