下面程序功能是使用函数模板求一个数组各元素的积。输出结果为362880。
#include
using namespace std;
_________________;
Type Mul(Type a[],int n)
{
Type t=1;
for (int i=0;i
} ;
int main()
{
Inta[]={1,2,3,4,5,6,7,8,9};
cout< < __________< < endl;
return 0:
}
template / template Mul (a, 9)注:每题答案有 2 处下划线,每答对一处得 2 分。
扫描二维码免费使用微信小程序搜题/刷题/查看解析。
版权声明:本文由翰林刷题小程序授权发布,如需转载请注明出处。