close
標題:
用C program 寫微分(integration)的方法
本人對c program不精 想發問如何用c program 寫微分數式 How to write the integration formular by c program For example, 怎樣才能寫到以下方程 in(|a^2| + |b^2| + |c^2|) 再者,假如要附加library library是何者? 望有心人答 之
最佳解答:
#include /* Propram to perform definite integration of a given function between two boundary limits input by user. Feel free to use and modify it, but please do not remove this comment. source: C for Engineering, http://c4engineering.hypermart.net */ #define N 1000 void main(void) { float i, a, b, sum = 0; printf("\nThis program will integrate a function between two boundary limits."); printf("\n\nEnter the first boundary limit:"); scanf("%f", &a); printf("\nEnter the second boundary limit:"); scanf("%f", &b); if(a > b) { i = a; a = b; b = i; } for(i = a; i < b; i += (b - a) / N) { /* Define your functionbelow, and include the suitable header files */ y = x * x + 2 * x - 4; sum += y * (b - a) / N; } printf("\n\nValue of integration is:%.3f", sum); getch(); return; }
其他解答:
用C program 寫微分(integration)的方法
- 為什麼重裝後c盤還有之前重裝的東西---
- how can i change the subject
- 有d 手指寫著compatible with Vista, 咁無寫果d 係咪唔可以係vista度用呢 -@1@
此文章來自奇摩知識+如有不便請留言告知
發問:本人對c program不精 想發問如何用c program 寫微分數式 How to write the integration formular by c program For example, 怎樣才能寫到以下方程 in(|a^2| + |b^2| + |c^2|) 再者,假如要附加library library是何者? 望有心人答 之
最佳解答:
#include
其他解答:
文章標籤
全站熱搜
留言列表