这是二分法程序。满足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