標題:
用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
其他解答:
留言列表