1038题 : 宏定义练习之三角形面积
摘要:# 自己写代码
```c
#include
#include
#define qius(a,b,c) s=(a+b+c)/2;
#define qiuarea(s,a,b,c) area=s……
简化宏定义求三角形面积
摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>#define S(a,b,c) (a+b+c)/2#define area(a,b,c) sqrt(……
注意头文件包含math.h
摘要:#include<stdio.h>#include<math.h>#define S(a,b,c) (a+b+c)*0.5#define area(S,a,b,c) sqrt(S*(S-a)*(S-b……
宏定义练习之三角形面积
摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>#define S(c,a,b) float s=(a+b+c)/2#define area(c,a……
宏定义练习之三角形面积
摘要:解题思路:已知三边可用海伦公式注意事项:参考代码:#include<stdio.h>#include<math.h>#define S(x,y,z) ((x)+(y)+(z))/2.0#define ……
1038: [编程入门]宏定义练习之三角形面积
摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h> //注意:代码中用到 sqrt(开平方)需添加头文件<math.h>#define S(a,b……
(轻轻松松)宏定义练习之三角形面积
摘要:解题思路: 直接用它给的公式算起!注意事项: 要用开方!参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int ……
编写题解 1038: [编程入门]宏定义练习之三角形面积
摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double a,b,c; cin>>a>>b……
题解 1038: [编程入门]宏定义练习之三角形面积
摘要:解题思路:注意事项:1.根据题目给的公式,输入a,b,c分别为三角形的三条边,S为(a+b+c)/2(这个就是著名的海伦公式),置到这两个东西之后就可以直接求解area了,由于题目要求使用宏定义来写,……