Untitled
unknown
plain_text
2 years ago
577 B
3
Indexable
Never
#include <iostream> using namespace std; inline float triangleArea(float base, float height) { return (0.5 * base * height); } inline float circleArea(float radius) { return (3.14 * radius * radius); } int main() { float base, height, radius; cout << "Enter the base and height of the triangle: "; cin >> base >> height; cout << "Area of the triangle is: " << triangleArea(base, height) << endl; cout << "Enter the radius of the circle: "; cin >> radius; cout << "Area of the circle is: " << circleArea(radius) << endl; return 0; }