這是二分法程序。滿足f(a)*f(b)<0d的f(x)在[a,b]區間的實根。 優點:1)程序簡單; 2)對f(x)要求不高,收斂性好。
上傳時間: 2013-12-18
上傳用戶:wpwpwlxwlx
小型公司工資管理系統 工資的計算方法: A 經理:固定月薪為8000; B 技術員:工作時間*小時工資(100元每小時); C 銷售員:銷售額*4%提成; D 銷售經理:底薪(5000)+所轄部門銷售額總額*0.5%;
上傳時間: 2013-12-18
上傳用戶:qilin
溫度華氏轉變攝氏 #include <stdio.h> #include <stdlib.h> enum x {A,B,C,D,E} int main(void) { int a=73,b=85,c=66 { if (a>=90) printf("a=A等級!!\n") else if (a>=80) printf("73分=B等級!!\n") else if (a>=70) printf("73分=C等級!!\n") else if (a>=60) printf("73分=D等級!!\n") else if (a<60) printf("73分=E等級!!\n") } { if (b>=90) printf("b=A等級!!\n") else if (b>=80) printf("85分=B等級!!\n") else if (b>=70) printf("85分=C等級!!\n") else if (b>=60) printf("85分=D等級!!\n") else if (b<60) printf("85分=E等級!!\n") } { if (c>=90) printf("c=A等級!!\n") else if (c>=80) printf("66分=B等級!!\n") else if (c>=70) printf("66分=C等級!!\n") else if (c>=60) printf("66分=D等級!!\n") else if (c<60) printf("66分=E等級!!\n") } system("pause") return 0 }
上傳時間: 2014-11-10
上傳用戶:wpwpwlxwlx
溫度華氏轉變攝氏 #include <stdio.h> #include <stdlib.h> enum x {A,B,C,D,E} int main(void) { int a=73,b=85,c=66 { if (a>=90) printf("a=A等級!!\n") else if (a>=80) printf("73分=B等級!!\n") else if (a>=70) printf("73分=C等級!!\n") else if (a>=60) printf("73分=D等級!!\n") else if (a<60) printf("73分=E等級!!\n") } { if (b>=90) printf("b=A等級!!\n") else if (b>=80) printf("85分=B等級!!\n") else if (b>=70) printf("85分=C等級!!\n") else if (b>=60) printf("85分=D等級!!\n") else if (b<60) printf("85分=E等級!!\n") } { if (c>=90) printf("c=A等級!!\n") else if (c>=80) printf("66分=B等級!!\n") else if (c>=70) printf("66分=C等級!!\n") else if (c>=60) printf("66分=D等級!!\n") else if (c<60) printf("66分=E等級!!\n") } system("pause") return 0 }
上傳時間: 2013-12-12
上傳用戶:亞亞娟娟123
Problem B:Longest Ordered Subsequence A numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subsequence of the given numeric sequence (a1, a2, ..., aN) be any sequence (ai1, ai2, ..., aiK), where 1 <= i1 < i2 < ... < iK <= N. For example, sequence (1, 7, 3, 5, 9, 4, 8) has ordered subsequences, e. g., (1, 7), (3, 4, 8) and many others. All longest ordered subsequences are of length 4, e. g., (1, 3, 5, 8).
標簽: Subsequence sequence Problem Longest
上傳時間: 2016-12-08
上傳用戶:busterman
功能:用斐波那契法求f(x)在區間[a,b]上的近似極小值。當且僅當f(x)在[a,b]上為單峰時次方法適用
標簽:
上傳時間: 2013-12-24
上傳用戶:csgcd001
黃金分割法求極小值 功能:用黃金分割法求f(x)在區間[a,b]上的近似極小值。當且僅當f(x)在[a,b]上為單峰時次方法適用
標簽: 分割
上傳時間: 2016-12-18
上傳用戶:小鵬
A、B、C、D、E五人合伙夜間捕魚,凌晨時都疲憊不堪,各自在河邊的樹叢中找地方睡著了,日上三竿,A第一個醒來,他將魚平分作五份,把多余的一條扔回湖中,拿自己的一份回家去了,B第二個醒來,也將魚平分為五份,扔掉多余的一條,只拿走自己的一份,接著C、D、E依次醒來,也都按同樣的辦法分魚。問五人至少合伙捕到多少條魚?每個人醒來后看到的魚數是多少條?
標簽: 捕魚
上傳時間: 2016-12-22
上傳用戶:familiarsmile
C語言是在 70年代初問世的。一九七八年由美國電話電報公司(AT&T)貝爾實驗室正式 發表了C 語言。同時由B.W.Kernighan和 D.M.Ritchit合著了著名的“THE C PROGRAMMING LANGUAGE”一書。通常簡稱為《K&R》,也有人稱之為《K&R》標準。但是,在《K&R》中并 沒有定義一個完整的標準C語言,后來由美國國家標準學會在此基礎上制定了一個C 語言 標準,于一九八三年發表。通常稱之為ANSI C。 當代最優秀的程序設計語言
標簽: Kernighan Ritchit PROGRA THE
上傳時間: 2016-12-23
上傳用戶:chens000
數值分析高斯——列主元消去法主程序 說明如下: % a----input,matrix of coefficient % b----input,right vector % sol----output,returns the solution of linear equation
標簽: input coefficient matrix vector
上傳時間: 2017-01-01
上傳用戶:dancnc