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

¿ª·¢ÓïÑÔ¤ÎC - C/C++ / CÓïÑÔ

¼ÆËã1-1/2+1/3-1/4+¡­+1/99-1/100+¡­,Ö±µ½×îºóÒ»ÏîµÄ¾ø¶ÔֵСÓÚ10-4Ϊֹ¡£
¿ª·¢ÓïÑÔ¤ÎC
Æ­ÈËÂ𣡲»ÒªÔÚÕâÑùÁË¡£
ÄãµÄÌâºÜ¼òµ¥µÄ£¬¿ÉϧÎÒ²»»á¡£
²»»á£¬²»»á£¬¾ÍÊDz»»á¡£

¸ßÊÖ°ï棺http://topic.csdn.net/u/20100514/22/a0306fbb-4006-49d3-b339-c3ef8eb347aa.html

¤ÎCÊÇʲô£¿CÓïÑÔÊÇÕâÑùµÄ...
C/C++ code:
/*¼ÆËã1-1/2+1/3-1/4+¡­+1/99-1/100+¡­,Ö±µ½×îºóÒ»ÏîµÄ¾ø¶ÔֵСÓÚ10-4Ϊֹ¡£*/
#include <stdio.h>
#include <math.h>

int main(void)
{
float sum=0,n=1,i=1;

while(fabs(i/n)>1e-4)
{
sum += i/n;
n++;
i = -i;
}
printf("%f\n",sum);

return 0;
}



ÎÒÓеãÔÎÔεĸоõ

[code=C/C++][/code]
#include <iostream>
using   namespace   std;
void   main()
{
int   i=1;
double   m,sum;
while(m> =10e-4)
{
if(i%2==0)
{m=1/i;sum=sum-m;}
else
{m=1/i;sum=sum+m;}
i++;
}
cout < <sum < <endl;
}
ÊÇC++³ÌÐò£¬Äã×Ô¼º¸Äһϰ¡

ÕæÊÇÎêÈèÁË¿ª·¢¶þ×Ö°¢

Â¥Ö÷Õâ¸ö¼òµ¥µÄ£¬£¬Â¥Ö÷ºÃºÃ¶¯¶¯ÄÔ½î

¿´ÁËÕâ¸öÌâ¾õµÃ¸Ã¸´Ï°Ò»Ï¸ߵÈÊýѧÁË


Ïà¹ØÎÊ´ð£º

linux»·¾³ÏÂgethostbynameº¯ÊýÎÊÌâ - C/C++ / CÓïÑÔ

дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
   
  struct hostent *hp; 
char AlarmDevIP[20];  
  int x2;

hp = gethostbyname("www.google.com");
if (hp)
{ ......

C/SÏîÄ¿¼Ü¹¹Éè¼Æ----ÇóÖú - Java / Java SE

±¾ÈËÕýÔÚÓÃJava×öÒ»¸öC/S¼Ü¹¹µÄÏîÄ¿£¬ 
¿ÉÊÇÓÉÓÚÏîÄ¿±È½Ï´ó£¬Ç°ÆڶԼܹ¹µÄÉè¼ÆÓÈÆäÖØÒª£¬ÒòΪºóÆÚ¿ÉÄÜËæʱ»á¼Ó¸ö¹¦ÄÜ»òÕßÈ¥µôijЩ¹¦ÄÜ¡£ 
ËùÒÔÌصØÑ°ÇóÈçºÎÉè¼ÆC/SµÄ¼Ü¹¹Ê¹³ÌÐò¸ü¼ÓÃæÏò¶ÔÏó¸ü¼ÓÒ×ÓÚά ......

ÇóÖú£ºC´úÂë¸Äд³ÉVB´úÂë - VB / »ù´¡Àà

Ë­ÄÜ°ïÎÒ°ÑÏÂÃæÕâЩ´úÂë¸Ä³ÉVBÐÎʽµÄ£¬¶àлÁË£¬¼±ÓÃ~~
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
float objfx(float x[]);
void constraint(float x[],float g ......

¸ÕѧÍêCµÄ»ù´¡£¬ÇóÏÂÒ»²½ - C/C++ / CÓïÑÔ

ÎÒ¸Õ°ÑÌ·ºÆÇ¿µÄµÚÈý°æµÄÊéѧÍ꣬ÎÒÖªµÀµÄÓÐC++£¬CºÍÖ¸Õë CȱÏݺÍÏÝÚå Cר¼Ò±ä³É£¬»¹ÓÐÊý¾Ý½á¹¹£¬ÎÒÏëÎÊÎÊÎÒÓ¦¸ÃÒÔʲô˳ÐòÀ´Ñ§ÄØ
CȱÏݺÍÏÝÚå Cר¼Ò±à³Ì
Êǽø½×µÄ£¬²»Óü±×Å¿´
ÖÁÓÚ
CºÍÖ¸Õë 
Äã²»Àí½âÖ ......

ÓйØAccessÊý¾Ý¿â´æÈ¡µÄÎÊÌâ - C++ Builder / »ù´¡Àà

ÈçºÎ½«Ò»¸öListBoxÖеÄÊý¾Ý´æÔÚÊý¾Ý¿âÖеÄÒ»¸ö×Ö¶ÎÏÂÃ棬²¢ÇÒÿÌõ¼Ç¼µÄ×Ö·û´®¸öÊý²»Ò»¶¨ ÒÔ¼°ÈçºÎ´ÓÊý¾Ý¿âÖжÁÈ¡¸ÃListBoxÖеÄËùÓмǼ
C/C++ code:

//´æÈëÊý¾Ý¿â
void __fastcall TForm1::Button5Click(TO ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ