#include<iostream>
using namespace std;
int sum(int x,int y){return x+y}
int product(int x,int y){return x*y}
void main()
{
————————(填一些)
int a, b, result;
cout << "a="; cin >> a;
cout << "b="; cin >> b;
pf = sum; result = pf(a, b);
cout << a << "+" << b << "=" << result << endl;
pf = product; result = pf(a, b);
cout << a << "*" << b << "=" << result << endl;
}
不懂 这里的调用
为啥有昵称
我是小hang家
相关分类