//LA_CH02_101
#include<iostream>
using namespace std;
#define add(a,b) ((a)+(b))
int main() {
float a = 0, b = 0;
cout << "please enter two number:"<<endl;
cin >> a;
cin >> b;
float i;
i = add(a, b);
cout << "the sum of two number is:" << i;
}
2-101 使用带参数的宏定义计算两个实数之和,并编写主函数验证宏的功能
于 2023-05-02 14:10:29 首次发布