³õC£¬Åöµ½Á½¸öÒÉ»óµÄµØ·½¡£´ïÈË¿©~~~~
±àÒëÆ÷£ºDev++
C/C++ code:
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
int n1(int x)
{
printf("in the n(1) is: %d\n",x);
if(x <= 1) return x;
return x * n1(--x);
}
int n2(int x)
{
printf("in the n(2) is: %d\n",x);
if(x <= 1) return x;
return x * n2(x - 1);
}
int main()
{
int r1 = n1(7);
printf("The r1 Value is: %d\n",r1);
printf("\n");
int r2 = n2(7);
printf("The r2 Value is: %d\n",r2);
getch();
/*system("pause");*/
}
Ϊʲô n1 »áÉÙµÚÒ»¸ö³Ë£¿
n1ÊÇ£º1 * 2 * 3 * 4 * 5 * 6
¶øn2ÊÇ 1 * 2 * 3 * 4 * 5 * 6 * 7¡£
C/C++ code:
return x * n1(--x);
return x * n2(x - 1);
ÓÐÇø±ð°¡£¿
µ±°Ñ n1 µÄ ·µ»ØÖµ¸ÄΪ£º
C/C++ code:
return (x--) * n1(x);
µ±°Ñ n1 µÄ ·µ»ØÖµ¸ÄΪ£º
C/C++ code:
return (x--) * n1(x);
<
Ïà¹ØÎÊ´ð£º
¶¨ÒåÁË
ifstream fin("in.txt");
±ÈÈçÎļþÊ×ÐÐÊÇÒ»¸öÊý×Ö£¬µÚ¶þÐÐÊÇÒ»´®×Ö·û¡£
int M;
char* str;
fin>>M;
fin>>str;
M¿ÉÒÔ¶Á³öÀ´£¬str×ÜÊÇÎÞ·¨¶ÁÈ ......
ANSI/ISO C ±ê×¼ÕâÑùÃèÊö:
ÔÚÉÏÒ»¸öºÍÏÂÒ»¸öÐòÁеãÖ®¼ä, Ò»¸ö¶ÔÏóËù±£´æµÄÖµÖÁ¶àÖ»Äܱ»±í
´ïʽµÄ¼ÆËãÐÞ¸ÄÒ»´Î¡£¶øÇÒǰһ¸öÖµÖ»ÄÜÓÃÓÚ¾ö¶¨½«Òª±£´æµÄÖµ¡£
ʵÔÚ²»Àí½âÕâ¾ä»°£¬Çë´ó¼ÒÒ»Æð˵˵£¿£¿ ......
ĿǰÓöµ½µÄÎÊÌâÊÇ£º
´æ·ÅÔÚÔ¶³Ì·þÎñÆ÷¶Ëc/s³ÌÐòÒ»ÓиüУ¬ÈçºÎ×öµ½¿Í»§¶ËÁ¢¼´ÏìÓ¦µ¯³öÓÐ×îÐÂÉý¼¶µÄÌáʾ´°¿Ú¡£
±¾À´Óеã˼·£º²ÉÓÃWCF+windowns·þÎñ+¶¨Ê±Æ÷µÄ·½Ê½Ò²ÄÜʵÏÖ£¬µ«ÊÇÿ̨¿Í»§¶Ë»ú×Óÿ¸ô¶¼È¥·ÃÎÊÒ»ÏÂÔ¶³Ì ......
ÇëÎÊÓÃC»òC++ÈçºÎ±àдÇó½â3Dħ·½µÄ³ÌÐò£¬¸Ã´ÓºÎ¿ªÊ¼£¿
лл¸÷룬°ïæÌáµã½¨Òé°É¡£
http://www.mofang.net/code/176/182/6581.html
ÎÒÖ»ÄÜÍ»ÆÆ60Ã룡°¦¡£
ÎÒ¸Õ¹ý40Ãë
googleµÄandroidÖÐÓиöOpenGL ES + ......