摘要: 已给sin0.32=0.314567,sin0.34=0.333487,sin0.36=0.352274,计算sin0.3367的值#include #include#include using namespace std;int main(){ double numerator_c... 阅读全文
posted @ 2015-11-27 23:53 硫酸亚铜 阅读(1757) 评论(0) 推荐(0) 编辑
摘要: C++当中获得现在计算机上所能表示的各种类型(比如int,longint,shortint,double,float等)最大最小有两种方法,一种是使用c++预先定义的宏,对于有些编译器可能需要包含和两种头文件,还有一种是使用numeric_limits::max()和numeric_limit... 阅读全文
posted @ 2015-11-27 20:37 硫酸亚铜 阅读(523) 评论(0) 推荐(0) 编辑
摘要: 2 1 0 03 1 3 00 5 2 70 0 9 0这个程序对于三对角矩阵都是有效的,为了精简代码可以考虑用链表的方式动态存储矩阵数据,由于程序已经完成,本次未采用链表,看着代码比较冗长#include#include... 阅读全文
posted @ 2015-11-27 19:31 硫酸亚铜 阅读(706) 评论(0) 推荐(0) 编辑
摘要: 0 0 0 0 0 00 3 0 0 0 00 0 0 6 0 00 0 9 0 0 ... 阅读全文
posted @ 2015-11-27 19:04 硫酸亚铜 阅读(611) 评论(0) 推荐(0) 编辑
摘要: #include#includeusingnamespace std;int main(){ doublex,y,h,temp,f; x=0; //对x赋初值 y=1; //对y赋初值 h=0.1; /... 阅读全文
posted @ 2015-11-27 19:01 硫酸亚铜 阅读(728) 评论(0) 推荐(0) 编辑
摘要: #include#includeusingnamespace std;int main(){ doublex,y,yn,h,temp,f; x=0; //对x赋初值 y=1; //对y赋初值 h=0.1; ... 阅读全文
posted @ 2015-11-27 18:59 硫酸亚铜 阅读(938) 评论(0) 推荐(0) 编辑
摘要: #include#includeusingnamespace std;int main(){ doublex,y,yn,h,temp; x=0; //对x赋初值 y=1; //对y赋初值 h=0.1; ... 阅读全文
posted @ 2015-11-27 18:56 硫酸亚铜 阅读(587) 评论(0) 推荐(0) 编辑
摘要: #include#includeusing namespace std;int main() { double x, y, h; //,x为对应的每一步x的值,其中y为对应的每一步y的值 x = 0; //对x赋初值 y = 1; ... 阅读全文
posted @ 2015-11-27 18:54 硫酸亚铜 阅读(1131) 评论(0) 推荐(0) 编辑
摘要: 编写一个用牛顿法解方程x=tanx 的程序,求最接近4.5和7.7的根#include#includeusingnamespace std;int main(){ doubleinit_first = 4.5, init_second =7.7; //求4.5和7.7附近的... 阅读全文
posted @ 2015-11-27 18:50 硫酸亚铜 阅读(1505) 评论(0) 推荐(0) 编辑
摘要: 利用二分法求解在区间[0,π/2]上的根#include#includeusingnamespace std;double dichotomy(doublebegin, double end);int main(){ constdouble pi =3.14; //定义π的... 阅读全文
posted @ 2015-11-27 18:37 硫酸亚铜 阅读(436) 评论(0) 推荐(0) 编辑