问题标题:
串行算法改成并行算法#include#includeusingnamespacestd;//设置全局数组——牛顿科特斯公式系数表doubleC[6][7]={{1.0/2,1.0/2},{1.0/6,4.0/6,1.0/6},{1.0/8,3.0/8,3.0/8,1.0/8},{7.0/90,16.0/45,2.0/15,16.0/45,7.0/90},{19.0/28
问题描述:
串行算法改成并行算法
#include
#include
usingnamespacestd;
//设置全局数组——牛顿科特斯公式系数表
doubleC[6][7]={{1.0/2,1.0/2},{1.0/6,4.0/6,1.0/6},{1.0/8,3.0/8,3.0/8,1.0/8},
{7.0/90,16.0/45,2.0/15,16.0/45,7.0/90},
{19.0/288,25.0/96,25.0/144,25.0/144,25.0/96,19.0/188},
{41.0/840,9.0/35,9.0/280,34.0/105,9.0/280,9.0/35,41.0/840}};
intmain()
{
doublea=0.0,b=0.0,Cotes=0.0;
intn=0;
coutb;
cout
李小娟回答:
#include"stdafx.h"#include#include#include#include#includeusingnamespacestd;//设置全局数组——牛顿科特斯公式系数表doubleC[6][7]={{1.0/2,1.0/2},{1.0/6,4.0/6,1.0/6},{1.0/8,3.0/8,3.0/8,1.0/8},{7...
查看更多