设计思路:c++函数的嵌套调用
代码:
#include<iostream>
using namespace std;
int fun2(int x,int y){
return m*m;
}
int fun1(int x,int y){
return fun2(x)+fun2(y);
}
int main(){
int a,b;
cout<<"please enter two integers(a and b):";
cin>>a>>b;
cout<<"The sum of square of a and b:"<<fun1(a,b)<<endl;
return 0;
}
总结:c++语言中函数的嵌套调用,函数允许嵌套调用