Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÓïÑÔº¯ÊýÄÇЩÊÂ(8)

C³ÌÐòÊÇÓÉÒ»×é»òÊDZäÁ¿»òÊǺ¯ÊýµÄÍⲿ¶ÔÏó×é³ÉµÄ¡£ º¯ÊýÊÇÒ»¸ö×ÔÎÒ°üº¬µÄÍê³ÉÒ»¶¨Ïà¹Ø¹¦ÄܵÄÖ´ÐдúÂë¶Î¡£ÏÂÃæС±àºÍ´ó¼Ò·ÖÏíÏÂCÓïÑÔÖеĺ¯Êý¡£
 
1.       gcvtº¯Êý
 
gcvtº¯ÊýµÄ¹¦ÄÜÊǰѸ¡µãÊýת»»³É×Ö·û´®£¬ÆäÓ÷¨ÊÇ£ºchar *gcvt(double value, int ndigit, char *buf);³ÌÐò ......

¿ªÊ¼¶Á¡¶Cר¼Ò±à³Ì¡·

    Ç°Á½ÌìÔÚÍøÉÏ¿´µ½¡¶Cר¼Ò±à³Ì¡·Õâ±¾ÊéµÄÆÀ¼Û»¹²»´í£¬¾ÍÈ¥ÊéµêÂòÁËÒ»±¾»ØÀ´Åõ¶Á£¬Ã¿ÌìÍíÉÏ¿´Ò»Ð©¡£Ì½ÌÖµÄÎÊÌâȷʵ±È½ÏÉ¶¼ÔÚÌÖÂÛCÓïÑÔ±¾ÉíµÄÎÊÌâÁË¡£Ìáµ½ÁËCÓïÑÔÖеÄһЩ²»×ã¡£±¾À´ÈÏΪCÓïÑÔÊÇÎÞи¿É»÷µÄ£¬¿É´Ó×÷ÕߵĽǶȿ´À´£¬È·ÊµÓÐЩ²»Í׵ĵط½£¬ÏëÏëÒ²ÊÇ£¬ÄÄÓÐÍêÃÀÎÞȱ¶«Î÷ÄØ¡£Æäʵ×÷ÕßÒ²²¢·ÇÔڱᵠ......

C/C++Èí¼þ¹¤³Ìʦ¾ÍÒµÇóÖ°ÊÖ²á½ÚÑ¡¶þ

 5¡¢#defineºê¶¨Òå¡£ºêÖ»ÊǼòµ¥µÄÎı¾Ìæ»»£¬ºÜÈÝÒ×ÒýÆðÆçÒå¡£
#include <stdio.h>
#define CONS(a,b) (int)(a##e##b)
#define STR(s) #s
int main()
{
   printf(STR(vck));
   printf("\n");
   printf("%d\n",CONS(2,3));
   return 0; ......

ÓÃCдµÄ¶ÁÈ¡´úÂëÐÐÊý¡£

½ñÌìÎÞÊ£¬ÔÚÂÛ̳ÉÏÒ»Ö±¿´Ìù×Ó£¬ºÜÉÙ¶¯ÊÖʵ¼ù£¬½ñÌìÊÔ×ÅдÁËÒ»¸ö¶ÁÈ¡Ô´³ÌÐò´úÂëÐÐÊýµÄÀý×Ó£º
ÏÖÔڵĴúÂëÈçÏ£¬¿ÉÄÜ»¹Óв»ÍêÉƵĵط½£¬ÒÔºóÔٸĽø£º
#include <stdio.h>
#define CHARCOUNT 255
#define CON 6 /*µ¥ÐÐ×¢ÊÍ×îÉÙµÄʱºò*/
int realLength = 0;
/*
* function name: strCount
* function : count ......

C/C++——С±à̸CÓïÑÔº¯ÊýÄÇЩÊÂ(12)

C³ÌÐòÊÇÓÉÒ»×é»òÊDZäÁ¿»òÊǺ¯ÊýµÄÍⲿ¶ÔÏó×é³ÉµÄ¡£ º¯ÊýÊÇÒ»¸ö×ÔÎÒ°üº¬µÄÍê³ÉÒ»¶¨Ïà¹Ø¹¦ÄܵÄÖ´ÐдúÂë¶Î¡£ÏÂÃæС±àºÍ´ó¼Ò·ÖÏíÏÂCÓïÑÔÖеĺ¯Êý¡£
1.       ldexpº¯Êý
ldexpº¯ÊýµÄ¹¦ÄÜÊǼÆËãvalue*2µÄÃÝ£¬ÆäÓ÷¨Îª£ºdouble ldexp(double value, int exp);³ÌÐòʵÀýÈçÏ£º
    ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ