Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

¡¾×ª¡¿c´úÂëÓÅ»¯


1¡¢Ñ¡ÔñºÏÊʵÄËã·¨ºÍÊý¾Ý½á¹¹
Ñ¡ÔñÒ»ÖÖºÏÊʵÄÊý¾Ý½á¹¹ºÜÖØÒª£¬Èç¹ûÔÚÒ»¶ÑËæ»ú´æ·ÅµÄÊýÖÐʹÓÃÁË´óÁ¿µÄ²åÈëºÍɾ³ýÖ¸ÁÄÇʹÓÃÁ´±íÒª¿ìµÃ¶à¡£Êý×éÓëÖ¸ÕëÓï¾ä¾ßÓÐÊ®·ÖÃÜÇеĹØϵ£¬Ò»°ãÀ´Ëµ£¬Ö¸Õë±È½ÏÁé»î¼ò½à£¬¶øÊý×éÔò±È½ÏÖ±¹Û£¬ÈÝÒ×Àí½â¡£¶ÔÓڴ󲿷ֵıàÒëÆ÷£¬Ê¹ÓÃÖ¸Õë±ÈʹÓÃÊý×éÉú³ÉµÄ´úÂë¸ü¶Ì£¬Ö´ÐÐЧÂʸü¸ß¡£
ÔÚÐí¶àÖÖÇé¿öÏ£¬¿ÉÒÔÓÃÖ¸ÕëÔËËã´úÌæÊý×éË÷Òý£¬ÕâÑù×ö³£³£ÄܲúÉúÓÖ¿ìÓ̵ֶĴúÂë¡£ÓëÊý×éË÷ÒýÏà±È£¬Ö¸ÕëÒ»°ãÄÜʹ´úÂëËٶȸü¿ì£¬Õ¼Óÿռä¸üÉÙ¡£Ê¹ÓöàάÊý×éʱ²îÒì¸üÃ÷ÏÔ¡£ÏÂÃæµÄ´úÂë×÷ÓÃÊÇÏàͬµÄ£¬µ«ÊÇЧÂʲ»Ò»Ñù¡£
Êý×éË÷Òý Ö¸ÕëÔËËã
For(;;){              p=array;
A=array[t++];        for(;;){
                      a=*(p++);
......               ......
} }
Ö¸Õë·½·¨µÄÓŵãÊÇ£¬ array µÄµØַÿ´Î×°ÈëµØÖ· p ºó£¬ÔÚÿ´ÎÑ­»·ÖÐÖ»Ðè¶Ô p ÔöÁ¿²Ù×÷¡£ÔÚÊý×éË÷Òý·½·¨ÖУ¬Ã¿´ÎÑ­»·Öж¼±ØÐë¸ù¾Ý t ÖµÇóÊý×éϱêµÄ¸´ÔÓÔËËã¡£
2¡¢Ê¹Óþ¡Á¿Ð¡µÄÊý¾ÝÀàÐÍ
Äܹ»Ê¹ÓÃ×Ö·ûÐÍ (char) ¶¨ÒåµÄ±äÁ¿£¬¾Í²»ÒªÊ¹ÓÃÕûÐÍ (int) ±äÁ¿À´¶¨Ò壻Äܹ»Ê¹ÓÃÕûÐͱäÁ¿¶¨ÒåµÄ±äÁ¿¾Í²»ÒªÓó¤ÕûÐÍ (long int) £¬Äܲ»Ê¹Óø¡µãÐÍ (float) ±äÁ¿¾Í²»ÒªÊ¹Óø¡µãÐͱäÁ¿¡£µ±È»£¬ÔÚ¶¨Òå±äÁ¿ºó²»Òª³¬¹ý±äÁ¿µÄ×÷Ó÷¶Î§£¬Èç¹û³¬¹ý±äÁ¿µÄ·¶Î§¸³Öµ£¬ C ±àÒëÆ÷²¢²»±¨´í£¬µ«³ÌÐòÔËÐнá¹ûÈ´´íÁË£¬¶øÇÒÕâÑùµÄ´íÎóºÜÄÑ·¢ÏÖ¡£
ÔÚ ICCAVR ÖУ¬¿ÉÒÔÔÚ Options ÖÐÉ趨ʹÓà printf ²ÎÊý£¬¾¡Á¿Ê¹Óûù±¾ÐͲÎÊý (%c ¡¢ %d ¡¢ %x ¡¢ %X ¡¢ %u ºÍ %s ¸ñʽ˵Ã÷·û ) £¬ÉÙÓó¤ÕûÐͲÎÊý (%ld ¡¢ %lu ¡¢ %lx ºÍ %lX ¸ñʽ˵Ã÷·û ) £¬ÖÁÓÚ¸¡µãÐ͵IJÎÊý (%f) Ôò¾¡Á¿²»ÒªÊ¹Óã¬ÆäËü C ±àÒëÆ÷Ò²Ò»Ñù¡£ÔÚÆäËüÌõ¼þ²»±äµÄÇé¿öÏ£¬Ê¹Óà %f ²ÎÊý£¬»áʹÉú³ÉµÄ´úÂëµÄÊýÁ¿Ôö¼ÓºÜ¶à£¬Ö´ÐÐËٶȽµµÍ¡£
3¡¢¼õÉÙÔËËãµÄÇ¿¶È
£¨1£©²é±í(ÓÎÏ·³ÌÐòÔ±±ØÐÞ¿Î)
Ò»¸ö´ÏÃ÷µÄÓÎÏ·´óϺ£¬»ù±¾Éϲ»»áÔÚ×Ô¼ºµÄÖ÷Ñ­»·Àï¸ãʲôÔËË㹤×÷£¬¾ø¶ÔÊÇÏȼÆËãºÃÁË£¬ÔÙµ½Ñ­»·Àï²é±í¡£¿´ÏÂÃæµÄÀý×Ó£º
¾É´úÂ룺
long factorial(int i)
{
if (i == 0)
return 1;
else
return i * factorial(i - 1);
}
дúÂ룺
static long factorial_table[] =
{1 £¬ 1 £¬ 2 £¬ 6 £¬ 24 £¬ 120 £¬ 720 /* etc */ };
long factorial(int i)
{
return factori


Ïà¹ØÎĵµ£º

¹ØÓÚc,c++Êä³ö¸ñʽ¿ØÖÆ

1.
printf("%.9lf\n",sum); 
//Êä³öСÊýµãºó9λ²»Ê¡È¥Ä©Î²¶àÓàµÄ0
2.
printf("%.10g\n",sum);
 //Êä³öСÊýµãºó9λ²»Ê¡È¥Ä©Î²¶àÓàµÄ0
3.
#include<iomanip>
cout<<setprecision(10)<<sum<<endl;
//Êä³öСÊýµãºó9λʡȥĩβ¶àÓàµÄ0
4. 
#include<iomanip>
cout.pre ......

cµÄIO

²¿·ÖÄÚÈÝÀ´×Ôhttp://www.programfan.com/article/2674.htmlÒÔ¼°http://www.programfan.com/article/showarticle.asp?id=2675
²¿·Ö·­ÒëÀ´×ÔTUM skript£¨c programmieren);
1.printf()£º
ǧÍò²»ÒªÒÅÍüÔÚprintf()µÄ×îºóÌí¼ÓNewLine"\n"¡£ÒòΪÔÚcµÄ¿âÖÐͨ³£ÓÐÐлº´æ»úÖÆ£¬Õâ¸öÒâζ×ÅÖ»Óе±Ò»ÐеÄÊäÈëͨ¹ý"\n"½áÊø֮ǰ£¬ÐеÄÊ ......

ÓÖÊÇ3Ö»C¡£¡£¡£= =

1.д³öÁ½¸öº¯Êý£¬·Ö±ðÇóÁ½¸öÕûÊýµÄ×î´ó¹«Ô¼ÊýºÍ×îС¹«±¶Êý£¬ÓÃÖ÷º¯Êýµ÷ÓÃÕâÁ½¸öº¯Êý£¬²¢Êä³ö½á¹û¡£Á½¸öÕûÊýÓɼüÅÌÊäÈë¡£
#include<stdio.h>
int gcd(int,int);
int lcm(int,int);
int gcd(int m,int n)
{
if(m%n==0)
return n;
else
return gcd(n,m%n);
}
int lcm(int m,int n)
{
return m*n/(gc ......

GCC ±àÒëc³ÌÐòµÄ·½·¨¼°¹ý³Ì½âÎö

GCC ±àÒëc³ÌÐòµÄ·½·¨¼°¹ý³Ì½âÎö 
Justin.zp.Yang 2010.04.10
        Ä¿Ç° Linux ÏÂ×î³£ÓÃµÄ C ÓïÑÔ±àÒëÆ÷ÊÇ GCC £¨ GNU Compiler Collection £©£¬ËüÊÇ GNU ÏîÄ¿ÖзûºÏ ANSI C ±ê×¼µÄ±àÒëϵͳ£¬Äܹ»±àÒëÓà C ¡¢ C++ ºÍ Object C µÈÓïÑÔ±àдµÄ³ÌÐò¡£ GCC ²»½ö¹¦Äܷdz£Ç¿´ó£¬½á¹¹ ......

¹«ÀúתũÀúC³ÌÐò

×¢ÒâÖ»Äܵ½2049Ä꣡
 
#define uchar unsigned char
#define uint unsigned int
#include <intrins.h>
/*
¹«ÀúÄê¶ÔÓ¦µÄÅ©ÀúÊý¾Ý,ÿÄêÈý×Ö½Ú,
¸ñʽµÚÒ»×Ö½ÚBIT7-4 λ±íʾÈòÔÂÔ·Ý,ֵΪ0 ΪÎÞÈòÔÂ,BIT3-0 ¶ÔӦũÀúµÚ1-4 ÔµĴóС
µÚ¶þ×Ö½ÚBIT7-0 ¶ÔӦũÀúµÚ5-12 Ô´óС,µÚÈý×Ö½ÚBIT7 ±íʾũÀúµÚ13 ¸öÔ´óÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ