qq_43519505
悲伤式`回忆
2019-04-04 21:45

求解递推关系式,求得bn,cn的每个值

  • c++

实现递推关系
#include
using namespace std;
void fun(int C[1],int B[1],int k1,int k2,int k3,int k4)
{for(int i=1;i C[i+1]=C[i]+k1*C[i]-k2*B[i]*C[i];
B[i+1]=B[i]-k3*B[i]+k4*B[i]*C[i];//求解这个f
cout }
void main()
{
int C[1],B[1],k1,k2,k3,k4;
cout cin>>C[1];
cin>>B[1];
cin>>k1;
cin>>k2;
cin>>k3;
cin>>k4;
cout<<fun(C[1],B[1],k1,k2,k3,k4)<<endl;
}
报错
:\c++\die'dai.cpp(19) : error C2664: 'fun' : cannot convert parameter 1 from 'int' to 'int []'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.

die'dai.exe - 1 error(s), 0 warning(s)

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答