Çë½Ì!!Ò»µÀ¹ØÓÚÓÃcдһ¸ö¹«Ê½µÄÌâ ¼±!
1+(x^2/2!)+(x^3/3!)+¡¡¡+(x^n/n!)
Çë¸ßÊÖ°ï°ïæ!
ллÁË
Äã×ܲ»ÄܽбðÈ˰ïÄãд£¬ÄãÓ¦¸Ã×Ô¼ºÊÔÊÔ
C/C++ code:
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
int jc(int n){
int sum=1;
while(n){
sum = sum*n;
n--;
}
return sum;
}
double func(int x,int n){
double sum = 1.0;
while(n > 1){
sum += pow(x,n)/jc(n);
n--;
}
return sum;
}
int main(int s,char **p){
double i = func(1,2);
printf("%lf\n",i);
return 0;
}
ÕâÊÇÎÒ×Ô¼ºÐ´µÄ
C/C++ code:
#include "stdio.h"
void main()
{
int s,x,n,i;
double sum=1.0;
int t=2;
scanf("%d,%d",&x,&n);
s=x*x;
for(i=2;i<=n;i++)
{
sum+=s/t;
s*=x;
t*=i;
}
printf("%f",sum);
}
C/C++ code:
sum+=(1.0*s)/t;
¿´¿´£º
C/C++ code
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
Ïà¹ØÎÊ´ð£º
QQȺ 29152388
ÓÑÇéUP
°ï¶¥
up
°ïup
up Ö§³Ö£¡
up jf
...ÄѵÀÓзÖ..?
up up up
Ï£ÍûÓеüӷ֣¬¹þ¹þ¡£
Ö§³Ö£¬ÎÒ¼ÓÁË£¬Ï£ÍûÂ¥Ö÷ÄܼÓÎÒ£¬¹²Í¬Ñ§Ï°¹þ
¼ÓÁË¡£
¶¥ÉÏ£¬Ã¿ÌìÊÕ»ñÒ»µã£¬Ö§³Ö ......
/* Note:Your choice is C IDE
×÷Óãº Ëæ»úÊý¼ÓÃÜ·¨£¬£¬£¬£¬
ÒÔÏÂÓÐÐí¶à²»¶®£¬Çë½Ìһϣ¬ÇëÖ÷Òâ´úÂë;
*/
#include <stdio.h>
#include <stdlib.h>
union
{
int value;
struct
{
c ......
ÏÖÔÚÓйØc++¡¢cµÄÊé¼®£¬ÄÇЩÊéÊǽÏÉî²ã´ÎµÄ£¿Çë½éÉܼ¸±¾£¿
#include <iostream>
using namespace std;
int funhion(int x, int y )
{
int m,n;
  ......
CÅÌÉ϶àµÄÎļþÃûΪ£ºdosh , Recycled ,System Volum information, AUTOEXEC.BAT, BOOT.INT , bootfoot.bin, CONFIG.SYS,IO.SYS, MSDOS.SYS, DETECT.COM ,ntldr, pagefile.sys;
¶øÇÒÿ¸öÅÌÉ϶¼ÓÐÕâЩÎļþ£ºRECYCLER ......