#include<iostream.h>
int f(int a[],int n)
{
if(n ==0)
{
return 0;
}
else
{
return a[n-1]*a[n-1]+f(a,n-1);
}
}
void main()
{
}我想在main函数里面调用int f(int a[],int n),请问怎么调用。谢谢。
int f(int a[],int n)
{
if(n ==0)
{
return 0;
}
else
{
return a[n-1]*a[n-1]+f(a,n-1);
}
}
void main()
{
}我想在main函数里面调用int f(int a[],int n),请问怎么调用。谢谢。
解决方案 »
- ado执行sql语句,如何Runtine Error的时候不致程序挂掉?
- CString 数组这样对不对的啊,
- 一个3通宵没有解决的编译错误,求
- 如何获取droplist风格的Combobox的static text控件的句柄
- 我的wm_mousehover为何执行两次?
- 进度条进程同步
- 菜鸟问题,有看过MFC WINDOWS程序设计的进
- 求socket课户端和服务器端程序
- 如何控制CPropertyPage在不同语言下的大小
- 请问哪里有VC写的围棋人机对弈源程序(有根据定式走棋的功能)?谢谢了!!!
- treectrl中插入了10000个节点,deleteallitems删除时响应很慢,如何作?
- 请问在C里,求X的Y次方是哪个函数?
{
int x[] = {3, 4, 5, 6, 7}; cout << f(x, 5);
}