double func(double A, double B){
 return 5A+2B;
}
のBを配列(40個の要素)にして、forで回すにはどうすればいいのですか?
for(i=0;i<40;i++){
 funcの書き方が分かりません
}