a. Write function that reads hight and the base and calulate volum the triangle object . Hint:
Fantastic news! We've Found the answer you've been seeking!
Question:
a. Write function that reads hight and the base and calulate volum the triangle object .
Hint: volum= ½ *hight* base.
B. In main:
- Define object of type triangle (triObj).
- Define Pointer object of type triangle (ptr).
- Let ptr points on triObj.
- Call function read for object triObj.
- Print the infotmation of the triObj using pointer ptr. (base,hight ,volum)
Suppose you have following code: [5 marks]
struct triangle
{
int hight;
int base;
double volum;
};
Related Book For
Posted Date: