We know the area of a triangle is equals to half of the product of its base and height. We will use the same formula to find the area of triangle. But in this program we will hard code base and height without asking the user to enter it. Because it is a beginner level program. In out later programs we will ask user to input base and height value and dynamically we will find the area of triangle.
int height = 6;
int base = 5;
printf(“Area of circle : %0.2f \n”, 0.5*height*base);
After successful completion of the program change the values of base and height and check whether the result is perfect or not.
My Self Subrat Dash. I have completed my MSc in Information Technology. Since last 12 years i am teaching Math and Computer at TTRC Computer Institute situated at Rayagada, Odisha, India.
I believe in conceptual learning, so i explain each and every concept with demos and examples, which makes it easier to understand.